From: Florian Date: Thu, 29 Oct 2015 18:00:59 +0000 (+0100) Subject: HTMLUserTextField: Enable suggestions for non-OOUI mode X-Git-Tag: 1.31.0-rc.0~8130^2 X-Git-Url: http://git.cyclocoop.org/data/%24self?a=commitdiff_plain;h=03fbed5176b056d02a7165415090f79069805e2b;p=lhc%2Fweb%2Fwiklou.git HTMLUserTextField: Enable suggestions for non-OOUI mode Bug: T117067 Change-Id: I03eabf6ed5d5a36534a5eec76c05d0a353ebf6ff --- diff --git a/includes/htmlform/HTMLUserTextField.php b/includes/htmlform/HTMLUserTextField.php index 9617c0a35a..8816d37fe8 100644 --- a/includes/htmlform/HTMLUserTextField.php +++ b/includes/htmlform/HTMLUserTextField.php @@ -44,4 +44,13 @@ class HTMLUserTextField extends HTMLTextField { 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 parent::getInputHtml( $value ); + } }