jenkins-bot has submitted this change and it was merged.

Change subject: Add user autocomplete and autofocus to Special:ActiveUsers
......................................................................


Add user autocomplete and autofocus to Special:ActiveUsers

Add autocomplete and autofocus as already exists on Special:ListUsers

Change-Id: I7a89023491cfff4d36c3214a4d56d4c0d35d192e
---
M includes/specials/SpecialActiveusers.php
1 file changed, 14 insertions(+), 4 deletions(-)

Approvals:
  Florianschmidtwelzow: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/specials/SpecialActiveusers.php 
b/includes/specials/SpecialActiveusers.php
index 047e941..e51b6c0 100644
--- a/includes/specials/SpecialActiveusers.php
+++ b/includes/specials/SpecialActiveusers.php
@@ -212,10 +212,20 @@
                $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 
) ) . '<br />';
+               # 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 === '',
+                       )
+               ) . '<br />';
 
                $out .= Xml::checkLabel( $this->msg( 'activeusers-hidebots' 
)->text(),
                        'hidebots', 'hidebots', $this->opts->getValue( 
'hidebots' ), array( 'tabindex' => 2 ) );

-- 
To view, visit https://gerrit.wikimedia.org/r/257194
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I7a89023491cfff4d36c3214a4d56d4c0d35d192e
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Umherirrender <umherirrender_de...@web.de>
Gerrit-Reviewer: Florianschmidtwelzow <florian.schmidt.stargatewis...@gmail.com>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to