r55445 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r55444‎ | r55445 | r55446 >
Date:21:35, 21 August 2009
Author:simetrical
Status:ok
Tags:
Comment:
Autofocus password, not name, if name is prefilled
Modified paths:
  • /trunk/phase3/includes/templates/Userlogin.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/templates/Userlogin.php
@@ -41,9 +41,10 @@
4242 'id' => 'wpName1',
4343 'tabindex' => '1',
4444 'size' => '20',
45 - 'required',
46 - 'autofocus'
47 - ) ); ?>
 45+ 'required'
 46+ # Can't do + array( 'autofocus' ) because + for arrays in PHP
 47+ # only works right for associative arrays! Thanks, PHP.
 48+ ) + ( $this->data['name'] ? array() : array( 'autofocus' => '' ) ) ); ?>
4849
4950 </td>
5051 </tr>
@@ -56,7 +57,7 @@
5758 'id' => 'wpPassword1',
5859 'tabindex' => '2',
5960 'size' => '20'
60 - ) ); ?>
 61+ ) + ( $this->data['name'] ? array( 'autofocus' ) : array() ) ); ?>
6162
6263 </td>
6364 </tr>

Status & tagging log