From 88eff25c54b5ca2fcef7f5c3ed76bebc7f369bf3 Mon Sep 17 00:00:00 2001 From: umherirrender Date: Fri, 10 Oct 2014 16:18:43 +0200 Subject: [PATCH] Add mediawiki.userSuggest to Special:UserRights This gives a suggestion list when typing a username Bug: 48240 Change-Id: I35dc9c4cf62c7a7ff5214d804d65b4ac9feeb897 --- includes/specials/SpecialUserrights.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/includes/specials/SpecialUserrights.php b/includes/specials/SpecialUserrights.php index cefdad078d..6ca57aa62f 100644 --- a/includes/specials/SpecialUserrights.php +++ b/includes/specials/SpecialUserrights.php @@ -415,6 +415,8 @@ class UserrightsPage extends SpecialPage { * Output a form to allow searching for a user */ function switchForm() { + $this->getOutput()->addModules( 'mediawiki.userSuggest' ); + $this->getOutput()->addHTML( Html::openElement( 'form', @@ -433,7 +435,10 @@ class UserrightsPage extends SpecialPage { 'username', 30, str_replace( '_', ' ', $this->mTarget ), - array( 'autofocus' => true ) + array( + 'autofocus' => true, + 'class' => 'mw-autocomplete-user', // used by mediawiki.userSuggest + ) ) . ' ' . Xml::submitButton( $this->msg( 'editusergroup' )->text() ) . Html::closeElement( 'fieldset' ) . -- 2.20.1