Florianschmidtwelzow has uploaded a new change for review.
https://gerrit.wikimedia.org/r/249793
Change subject: HTMLUserTextField: Enable suggestions for non-OOUI mode
......................................................................
HTMLUserTextField: Enable suggestions for non-OOUI mode
Bug: T117067
Change-Id: I03eabf6ed5d5a36534a5eec76c05d0a353ebf6ff
---
M includes/htmlform/HTMLUserTextField.php
1 file changed, 9 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/93/249793/1
diff --git a/includes/htmlform/HTMLUserTextField.php
b/includes/htmlform/HTMLUserTextField.php
index 9617c0a..b1d0786 100644
--- a/includes/htmlform/HTMLUserTextField.php
+++ b/includes/htmlform/HTMLUserTextField.php
@@ -44,4 +44,13 @@
return new UserInputWidget( $params );
}
+
+ public function getInputHtml( $value ) {
+ // add the required module and css class for user suggestions
in non-OOUI mode
+ $this->mParent->getOutput()->addModules(
'mediawiki.userSuggest' );
+ $this->mClass = 'mw-autocomplete-user';
+
+ // return parent html
+ return call_user_func_array( array( 'parent', 'getInputHtml' ),
array( $value ) );
+ }
}
--
To view, visit https://gerrit.wikimedia.org/r/249793
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I03eabf6ed5d5a36534a5eec76c05d0a353ebf6ff
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits