r55453 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r55452‎ | r55453 | r55454 >
Date:22:30, 21 August 2009
Author:simetrical
Status:resolved (Comments)
Tags:
Comment:
Use Html::input()/autofocus a bunch more places
Modified paths:
  • /trunk/phase3/includes/Article.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialBlockip.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialContributions.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialDeletedContributions.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Article.php
@@ -2638,8 +2638,12 @@
26392639 Xml::label( wfMsg( 'deleteotherreason' ), 'wpReason' ) .
26402640 "</td>
26412641 <td class='mw-input'>" .
2642 - Xml::input( 'wpReason', 60, $reason, array( 'type' => 'text', 'maxlength' => '255',
2643 - 'tabindex' => '2', 'id' => 'wpReason' ) ) .
 2642+ Html::input( 'wpReason', $reason, 'text', array(
 2643+ 'maxlength' => '255',
 2644+ 'tabindex' => '2',
 2645+ 'id' => 'wpReason',
 2646+ 'autofocus'
 2647+ ) ) .
26442648 "</td>
26452649 </tr>
26462650 <tr>
Index: trunk/phase3/includes/specials/SpecialContributions.php
@@ -266,7 +266,10 @@
267267 'contribs', 'newbie' , 'newbie', $this->opts['contribs'] == 'newbie' ? true : false ) . '<br />' .
268268 Xml::radioLabel( wfMsgExt( 'sp-contributions-username', array( 'parsemag' ) ),
269269 'contribs' , 'user', 'user', $this->opts['contribs'] == 'user' ? true : false ) . ' ' .
270 - Xml::input( 'target', 20, $this->opts['target']) . ' '.
 270+ Html::input( 'target', $this->opts['target'], 'text', array(
 271+ 'size' => '20',
 272+ 'required' => ''
 273+ ) + ( $this->opts['target'] ? array() : array( 'autofocus' ) ) ) . ' '.
271274 '<span style="white-space: nowrap">' .
272275 Xml::label( wfMsg( 'namespace' ), 'namespace' ) . ' ' .
273276 Xml::namespaceSelector( $this->opts['namespace'], '' ) .
Index: trunk/phase3/includes/specials/SpecialBlockip.php
@@ -154,11 +154,13 @@
155155 {$mIpaddress}
156156 </td>
157157 <td class='mw-input'>" .
158 - Xml::input( 'wpBlockAddress', 45, $this->BlockAddress,
159 - array(
160 - 'tabindex' => '1',
161 - 'id' => 'mw-bi-target',
162 - 'onchange' => 'updateBlockOptions()' ) ). "
 158+ Html::input( 'wpBlockAddress', $this->BlockAddress, 'text', array(
 159+ 'tabindex' => '1',
 160+ 'id' => 'mw-bi-target',
 161+ 'onchange' => 'updateBlockOptions()',
 162+ 'size' => '45',
 163+ 'required' => ''
 164+ ) + ( $this->BlockAddress ? array() : array( 'autofocus' ) ) ). "
163165 </td>
164166 </tr>
165167 <tr>"
@@ -203,8 +205,12 @@
204206 {$mIpbreason}
205207 </td>
206208 <td class='mw-input'>" .
207 - Xml::input( 'wpBlockReason', 45, $this->BlockReason,
208 - array( 'tabindex' => '5', 'id' => 'mw-bi-reason', 'maxlength'=> '200' ) ) . "
 209+ Html::input( 'wpBlockReason', $this->BlockReason, 'text', array(
 210+ 'tabindex' => '5',
 211+ 'id' => 'mw-bi-reason',
 212+ 'maxlength' => '200',
 213+ 'size' => '45'
 214+ ) + ( $this->BlockAddress ? array( 'autofocus' ) : array() ) ) . "
209215 </td>
210216 </tr>
211217 <tr id='wpAnonOnlyRow'>
Index: trunk/phase3/includes/specials/SpecialDeletedContributions.php
@@ -418,7 +418,10 @@
419419 $f .= Xml::openElement( 'fieldset' ) .
420420 Xml::element( 'legend', array(), wfMsg( 'sp-contributions-search' ) ) .
421421 Xml::tags( 'label', array( 'for' => 'target' ), wfMsgExt( 'sp-contributions-username', 'parseinline' ) ) . ' ' .
422 - Xml::input( 'target', 20, $options['target']) . ' '.
 422+ Html::input( 'target', $options['target'], 'text', array(
 423+ 'size' => '20',
 424+ 'required' => ''
 425+ ) + ( $options['target'] ? array() : array( 'autofocus' ) ) ) . ' '.
423426 Xml::label( wfMsg( 'namespace' ), 'namespace' ) . ' ' .
424427 Xml::namespaceSelector( $options['namespace'], '' ) . ' ' .
425428 Xml::submitButton( wfMsg( 'sp-contributions-submit' ) ) .

Follow-up revisions

RevisionCommit summaryAuthorDate
r55596Restore size=60 that got eaten by r55453...simetrical15:12, 26 August 2009

Comments

#Comment by Brion VIBBER (talk | contribs)   15:54, 26 August 2009

missing size fixed on delete form

Status & tagging log