Beautify the Special:Userrights form a bit
authorBrion Vibber <brion@users.mediawiki.org>
Fri, 27 Apr 2007 15:53:28 +0000 (15:53 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Fri, 27 Apr 2007 15:53:28 +0000 (15:53 +0000)
includes/HTMLForm.php
includes/SpecialUserrights.php
languages/messages/MessagesEn.php

index 1a2f581..715c8c8 100644 (file)
@@ -123,6 +123,7 @@ class HTMLForm {
 function HTMLSelectGroups($selectname, $selectmsg, $selected=array(), $multiple=false, $size=6, $reverse=false) {
        $groups = User::getAllGroups();
        $out = htmlspecialchars( wfMsg( $selectmsg ) );
+       $out .= "<br />";
 
        if( $multiple ) {
                $attribs = array(
@@ -132,6 +133,7 @@ function HTMLSelectGroups($selectname, $selectmsg, $selected=array(), $multiple=
        } else {
                $attribs = array( 'name' => $selectname );
        }
+       $attribs['style'] = 'width: 100%';
        $out .= wfElement( 'select', $attribs, null );
 
        foreach( $groups as $group ) {
index c6e4669..597b7f2 100644 (file)
@@ -158,17 +158,37 @@ class UserrightsForm extends HTMLForm {
                        Xml::openElement( 'fieldset' ) .
                        Xml::element( 'legend', array(), wfMsg( 'userrights-editusergroup' ) ) .
                        $wgOut->parse( wfMsg( 'editinguser', $username ) ) .
-                       "<table border='0' align='center'>
+                       "<table border='0'>
                        <tr>
-                               <td>" . HTMLSelectGroups( 'member', $this->mName.'-groupsmember', $groups, true, 6 ) . "</td>
-                               <td align='right'>" . HTMLSelectGroups( 'available', $this->mName.'-groupsavailable', $groups, true, 6, true) . "</td>
-                       </tr><tr>
-                               <td>" . $wgOut->parse( wfMsg( 'userrights-reason' ) ) . "</td>
-                               <td align='right'>" . Xml::input( 'user-reason', 30 ) . "</td>
+                               <td></td>
+                               <td>
+                               <table width='400'>
+                                       <tr>
+                                               <td width='50%'>" . HTMLSelectGroups( 'member', $this->mName.'-groupsmember', $groups, true, 6 ) . "</td>
+                                               <td width='50%'>" . HTMLSelectGroups( 'available', $this->mName.'-groupsavailable', $groups, true, 6, true) . "</td>
+                                       </tr>
+                               </table>
                        </tr>
-                       </table> \n" .
-                       $wgOut->parse( wfMsg('userrights-groupshelp') ) .
-                       Xml::submitButton( wfMsg( 'saveusergroups' ), array( 'name' => 'saveusergroups' ) ) .
+                       <tr>
+                               <td colspan='2'>" .
+                                       $wgOut->parse( wfMsg('userrights-groupshelp') ) .
+                               "</td>
+                       </tr>
+                       <tr>
+                               <td>" .
+                                       Xml::label( wfMsg( 'userrights-reason' ), 'wpReason' ) .
+                               "</td>
+                               <td>" .
+                                       Xml::input( 'user-reason', 60, false, array( 'id' => 'wpReason' ) ) .
+                               "</td>
+                       </tr>
+                       <tr>
+                               <td></td>
+                               <td>" .
+                               Xml::submitButton( wfMsg( 'saveusergroups' ), array( 'name' => 'saveusergroups' ) ) .
+                               "</td>
+                       </tr>
+                       </table>\n" .
                        Xml::closeElement( 'fieldset' ) .
                        Xml::closeElement( 'form' ) . "\n"
                );
index a2ad2f3..40fc283 100644 (file)
@@ -1265,7 +1265,7 @@ containing all of the search terms will appear in the result).",
 'userrights-groupsavailable' => 'Available groups:',
 'userrights-groupshelp' => 'Select groups you want the user to be removed from or added to.
 Unselected groups will not be changed. You can deselect a group with CTRL + Left Click',
-'userrights-reason' => 'Reason:',
+'userrights-reason' => 'Reason for change:',
 
 # Groups
 'group'                   => 'Group:',