Jack Phoenix has uploaded a new change for review. https://gerrit.wikimedia.org/r/280159
Change subject: Add user name autocompletion support to Special:EditProfile & Special:RemoveAvatar ...................................................................... Add user name autocompletion support to Special:EditProfile & Special:RemoveAvatar Change-Id: I9e6f408592da89e1bca76d76284b3fe02981d574 --- M UserProfile/SpecialEditProfile.php M UserProfile/SpecialRemoveAvatar.php 2 files changed, 5 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SocialProfile refs/changes/59/280159/1 diff --git a/UserProfile/SpecialEditProfile.php b/UserProfile/SpecialEditProfile.php index 0a8a1c0..f366841 100644 --- a/UserProfile/SpecialEditProfile.php +++ b/UserProfile/SpecialEditProfile.php @@ -77,6 +77,7 @@ // Still not set? Just give up and show the "search for a user" form... if ( !$userFromRequest ) { + $out->addModules( 'mediawiki.userSuggest' ); $out->addHTML( $this->createUserInputForm() ); return; } @@ -84,6 +85,7 @@ $target = User::newFromName( $userFromRequest ); if ( !$target || $target->getID() == 0 ) { + $out->addModules( 'mediawiki.userSuggest' ); $out->addHTML( $this->msg( 'nosuchusershort', htmlspecialchars( $userFromRequest ) )->escaped() ); $out->addHTML( $this->createUserInputForm() ); return; @@ -138,6 +140,7 @@ ) ) . Xml::label( $this->msg( 'username' )->parse(), 'mw-socialprofile-user' ) . Xml::input( 'wpUser', 60, '', array( + 'class' => 'mw-autocomplete-user', 'tabindex' => '1', 'id' => 'mw-socialprofile-user', 'maxlength' => '200' diff --git a/UserProfile/SpecialRemoveAvatar.php b/UserProfile/SpecialRemoveAvatar.php index a6c39dd..474f289 100644 --- a/UserProfile/SpecialRemoveAvatar.php +++ b/UserProfile/SpecialRemoveAvatar.php @@ -104,6 +104,7 @@ if ( $par ) { $out->addHTML( $this->showUserAvatar( $par ) ); } else { + $out->addModules( 'mediawiki.userSuggest' ); $out->addHTML( $this->showUserForm() ); } } @@ -117,7 +118,7 @@ $output = '<form method="get" name="avatar" action="">' . Html::hidden( 'title', $this->getPageTitle() ) . '<b>' . $this->msg( 'username' )->text() . '</b> - <input type="text" name="user" /> + <input type="text" name="user" class="mw-autocomplete-user" /> <input type="submit" value="' . $this->msg( 'search' )->plain() . '" /> </form>'; return $output; -- To view, visit https://gerrit.wikimedia.org/r/280159 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9e6f408592da89e1bca76d76284b3fe02981d574 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SocialProfile Gerrit-Branch: master Gerrit-Owner: Jack Phoenix <j...@countervandalism.net> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits