From fa36b1cabb276b87e272a562cfc98271a5ecb8ce Mon Sep 17 00:00:00 2001 From: Alex Monk Date: Sun, 17 Feb 2013 17:17:00 +0000 Subject: [PATCH] Set initial focus on some special pages * Special:Userrights - username (bug 43557) * Special:Undelete - search prefix and reason (bug 43559) * Special:BookSources - ISBN (bug 43561) Bug: 43557 Bug: 43559 Bug: 43561 Change-Id: Idda08ffb3ca3d84d2adb89e5bc5f8e494d491486 --- includes/specials/SpecialBooksources.php | 3 +-- includes/specials/SpecialUndelete.php | 5 +++-- includes/specials/SpecialUserrights.php | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/includes/specials/SpecialBooksources.php b/includes/specials/SpecialBooksources.php index 0d7688316e..5ad961c3db 100644 --- a/includes/specials/SpecialBooksources.php +++ b/includes/specials/SpecialBooksources.php @@ -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 .= '

' . Xml::inputLabel( $this->msg( 'booksources-isbn' )->text(), 'isbn', 'isbn', 20, $this->isbn ); + $form .= '

' . Xml::inputLabel( $this->msg( 'booksources-isbn' )->text(), 'isbn', 'isbn', 20, $this->isbn, array( 'autofocus' => true ) ); $form .= ' ' . Xml::submitButton( $this->msg( 'booksources-go' )->text() ) . "

\n"; $form .= Html::closeElement( 'form' ) . "\n"; $form .= Html::closeElement( 'fieldset' ) . "\n"; - return $form; } diff --git a/includes/specials/SpecialUndelete.php b/includes/specials/SpecialUndelete.php index 9050724955..242c5e8572 100644 --- a/includes/specials/SpecialUndelete.php +++ b/includes/specials/SpecialUndelete.php @@ -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' ) . " " . - Xml::input( 'wpComment', 50, $this->mComment, array( 'id' => 'wpComment' ) ) . + Xml::input( 'wpComment', 50, $this->mComment, array( 'id' => 'wpComment', 'autofocus' => true ) ) . " diff --git a/includes/specials/SpecialUserrights.php b/includes/specials/SpecialUserrights.php index f23bc2dfbd..d47cf8b7fb 100644 --- a/includes/specials/SpecialUserrights.php +++ b/includes/specials/SpecialUserrights.php @@ -391,7 +391,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" -- 2.20.1