Fix tabindex of token so it's not the same as password (which has 2)

Setting it to 3, has the effect of doing the LDAP first and then the token,
which fits the user model

Order of boxes is Username, password, domain, token

These then have a tab index of 1, 2, 3, 2

Tabbing down takes you in the order username, password, token, labs, which is... irritating, to say the least!

Change-Id: Idabb70c963d16f2cd223c5d94e0211ccaf6fdedd
This commit is contained in:
Reedy 2012-08-02 03:04:42 +01:00
parent 0ef31e894d
commit 8992e6f541

View file

@ -282,13 +282,16 @@ class OATHUser {
}
/**
* @param $template
* @param $template UserloginTemplate
* @return bool
*/
static function ModifyUITemplate( &$template ) {
// FIXME: First assignment of $input unused
$input = array( 'msg' => 'oathauth-token', 'type' => 'text', 'name' => 'token', 'value' => '', 'helptext' => 'oathauth-tokenhelp' );
$input = '<td class="mw-label"><label for="wpOATHToken">' . wfMsgHtml( 'oathauth-token' ) . '</label></td><td class="mw-input">' . Html::input( 'wpOATHToken', null, 'password', array( 'class' => 'loginPassword', 'id' => 'wpOATHToken', 'tabindex' => '2', 'size' => '20' ) ) . '</td>';
$input = '<td class="mw-label"><label for="wpOATHToken">'
. wfMsgHtml( 'oathauth-token' )
. '</label></td><td class="mw-input">'
. Html::input( 'wpOATHToken', null, 'password', array(
'class' => 'loginPassword', 'id' => 'wpOATHToken', 'tabindex' => '3', 'size' => '20'
) ) . '</td>';
$template->set( 'extrafields', $input );
return true;