r21657 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r21656‎ | r21657 | r21658 >
Date:15:53, 27 April 2007
Author:brion
Status:old
Tags:
Comment:
Beautify the Special:Userrights form a bit
Modified paths:
  • /trunk/phase3/includes/HTMLForm.php (modified) (history)
  • /trunk/phase3/includes/SpecialUserrights.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesEn.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SpecialUserrights.php
@@ -158,17 +158,37 @@
159159 Xml::openElement( 'fieldset' ) .
160160 Xml::element( 'legend', array(), wfMsg( 'userrights-editusergroup' ) ) .
161161 $wgOut->parse( wfMsg( 'editinguser', $username ) ) .
162 - "<table border='0' align='center'>
 162+ "<table border='0'>
163163 <tr>
164 - <td>" . HTMLSelectGroups( 'member', $this->mName.'-groupsmember', $groups, true, 6 ) . "</td>
165 - <td align='right'>" . HTMLSelectGroups( 'available', $this->mName.'-groupsavailable', $groups, true, 6, true) . "</td>
166 - </tr><tr>
167 - <td>" . $wgOut->parse( wfMsg( 'userrights-reason' ) ) . "</td>
168 - <td align='right'>" . Xml::input( 'user-reason', 30 ) . "</td>
 164+ <td></td>
 165+ <td>
 166+ <table width='400'>
 167+ <tr>
 168+ <td width='50%'>" . HTMLSelectGroups( 'member', $this->mName.'-groupsmember', $groups, true, 6 ) . "</td>
 169+ <td width='50%'>" . HTMLSelectGroups( 'available', $this->mName.'-groupsavailable', $groups, true, 6, true) . "</td>
 170+ </tr>
 171+ </table>
169172 </tr>
170 - </table> \n" .
171 - $wgOut->parse( wfMsg('userrights-groupshelp') ) .
172 - Xml::submitButton( wfMsg( 'saveusergroups' ), array( 'name' => 'saveusergroups' ) ) .
 173+ <tr>
 174+ <td colspan='2'>" .
 175+ $wgOut->parse( wfMsg('userrights-groupshelp') ) .
 176+ "</td>
 177+ </tr>
 178+ <tr>
 179+ <td>" .
 180+ Xml::label( wfMsg( 'userrights-reason' ), 'wpReason' ) .
 181+ "</td>
 182+ <td>" .
 183+ Xml::input( 'user-reason', 60, false, array( 'id' => 'wpReason' ) ) .
 184+ "</td>
 185+ </tr>
 186+ <tr>
 187+ <td></td>
 188+ <td>" .
 189+ Xml::submitButton( wfMsg( 'saveusergroups' ), array( 'name' => 'saveusergroups' ) ) .
 190+ "</td>
 191+ </tr>
 192+ </table>\n" .
173193 Xml::closeElement( 'fieldset' ) .
174194 Xml::closeElement( 'form' ) . "\n"
175195 );
Index: trunk/phase3/includes/HTMLForm.php
@@ -123,6 +123,7 @@
124124 function HTMLSelectGroups($selectname, $selectmsg, $selected=array(), $multiple=false, $size=6, $reverse=false) {
125125 $groups = User::getAllGroups();
126126 $out = htmlspecialchars( wfMsg( $selectmsg ) );
 127+ $out .= "<br />";
127128
128129 if( $multiple ) {
129130 $attribs = array(
@@ -132,6 +133,7 @@
133134 } else {
134135 $attribs = array( 'name' => $selectname );
135136 }
 137+ $attribs['style'] = 'width: 100%';
136138 $out .= wfElement( 'select', $attribs, null );
137139
138140 foreach( $groups as $group ) {
Index: trunk/phase3/languages/messages/MessagesEn.php
@@ -1265,7 +1265,7 @@
12661266 'userrights-groupsavailable' => 'Available groups:',
12671267 'userrights-groupshelp' => 'Select groups you want the user to be removed from or added to.
12681268 Unselected groups will not be changed. You can deselect a group with CTRL + Left Click',
1269 -'userrights-reason' => 'Reason:',
 1269+'userrights-reason' => 'Reason for change:',
12701270
12711271 # Groups
12721272 'group' => 'Group:',