Merge "Set initial focus on some special pages"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Sun, 30 Jun 2013 17:07:01 +0000 (17:07 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Sun, 30 Jun 2013 17:07:01 +0000 (17:07 +0000)
includes/specials/SpecialBooksources.php
includes/specials/SpecialUndelete.php
includes/specials/SpecialUserrights.php

index 0d76883..5ad961c 100644 (file)
@@ -121,11 +121,10 @@ class SpecialBookSources extends SpecialPage {
                $form .= Html::element( 'legend', array(), $this->msg( 'booksources-search-legend' )->text() ) . "\n";
                $form .= Html::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) ) . "\n";
                $form .= Html::hidden( 'title', $this->getTitle()->getPrefixedText() ) . "\n";
-               $form .= '<p>' . Xml::inputLabel( $this->msg( 'booksources-isbn' )->text(), 'isbn', 'isbn', 20, $this->isbn );
+               $form .= '<p>' . Xml::inputLabel( $this->msg( 'booksources-isbn' )->text(), 'isbn', 'isbn', 20, $this->isbn, array( 'autofocus' => true ) );
                $form .= '&#160;' . Xml::submitButton( $this->msg( 'booksources-go' )->text() ) . "</p>\n";
                $form .= Html::closeElement( 'form' ) . "\n";
                $form .= Html::closeElement( 'fieldset' ) . "\n";
-
                return $form;
        }
 
index c49c3eb..caf6a8b 100644 (file)
@@ -797,7 +797,8 @@ class SpecialUndelete extends SpecialPage {
                                        'prefix',
                                        'prefix',
                                        20,
-                                       $this->mSearchPrefix
+                                       $this->mSearchPrefix,
+                                       array( 'autofocus' => true )
                                ) . ' ' .
                                Xml::submitButton( $this->msg( 'undelete-search-submit' )->text() ) .
                                Xml::closeElement( 'fieldset' ) .
@@ -1252,7 +1253,7 @@ class SpecialUndelete extends SpecialPage {
                                        Xml::label( $this->msg( 'undeletecomment' )->text(), 'wpComment' ) .
                                        "</td>
                                        <td class='mw-input'>" .
-                                       Xml::input( 'wpComment', 50, $this->mComment, array( 'id' => 'wpComment' ) ) .
+                                       Xml::input( 'wpComment', 50, $this->mComment, array( 'id' => 'wpComment', 'autofocus' => true ) ) .
                                        "</td>
                                </tr>
                                <tr>
index 8b24372..e893455 100644 (file)
@@ -402,7 +402,7 @@ class UserrightsPage extends SpecialPage {
                        Html::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript, 'name' => 'uluser', 'id' => 'mw-userrights-form1' ) ) .
                        Html::hidden( 'title', $this->getTitle()->getPrefixedText() ) .
                        Xml::fieldset( $this->msg( 'userrights-lookup-user' )->text() ) .
-                       Xml::inputLabel( $this->msg( 'userrights-user-editname' )->text(), 'user', 'username', 30, str_replace( '_', ' ', $this->mTarget ) ) . ' ' .
+                       Xml::inputLabel( $this->msg( 'userrights-user-editname' )->text(), 'user', 'username', 30, str_replace( '_', ' ', $this->mTarget ), array( 'autofocus' => true ) ) . ' ' .
                        Xml::submitButton( $this->msg( 'editusergroup' )->text() ) .
                        Html::closeElement( 'fieldset' ) .
                        Html::closeElement( 'form' ) . "\n"