From: umherirrender Date: Sun, 6 Dec 2015 14:26:52 +0000 (+0100) Subject: Add user autocomplete and autofocus to Special:ActiveUsers X-Git-Tag: 1.31.0-rc.0~8788^2 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22auteur_infos%22%2C%20%22id_auteur=%24id%22%29%20.%20%22?a=commitdiff_plain;h=516c6bf62a4a6a62c224185c2a6b514f218146a0;p=lhc%2Fweb%2Fwiklou.git Add user autocomplete and autofocus to Special:ActiveUsers Add autocomplete and autofocus as already exists on Special:ListUsers Change-Id: I7a89023491cfff4d36c3214a4d56d4c0d35d192e --- diff --git a/includes/specials/SpecialActiveusers.php b/includes/specials/SpecialActiveusers.php index 047e941382..e51b6c03f7 100644 --- a/includes/specials/SpecialActiveusers.php +++ b/includes/specials/SpecialActiveusers.php @@ -212,10 +212,20 @@ class ActiveUsersPager extends UsersPager { $out .= Xml::fieldset( $this->msg( 'activeusers' )->text() ) . "\n"; $out .= Html::hidden( 'title', $self->getPrefixedDBkey() ) . $limit . "\n"; - # Username field - $out .= Xml::inputLabel( $this->msg( 'activeusers-from' )->text(), - 'username', 'offset', 20, $this->requestedUser, - array( 'class' => 'mw-ui-input-inline', 'tabindex' => 1 ) ) . '
'; + # Username field (with autocompletion support) + $this->getOutput()->addModules( 'mediawiki.userSuggest' ); + $out .= Xml::inputLabel( + $this->msg( 'activeusers-from' )->text(), + 'username', + 'offset', + 20, + $this->requestedUser, + array( + 'class' => 'mw-ui-input-inline mw-autocomplete-user', + 'tabindex' => 1, + 'autofocus' => $this->requestedUser === '', + ) + ) . '
'; $out .= Xml::checkLabel( $this->msg( 'activeusers-hidebots' )->text(), 'hidebots', 'hidebots', $this->opts->getValue( 'hidebots' ), array( 'tabindex' => 2 ) );