From: Florian Date: Fri, 6 Nov 2015 17:17:29 +0000 (+0100) Subject: Make TitleInputWidget configurable, if term should be highlighted or not X-Git-Tag: 1.31.0-rc.0~9012^2 X-Git-Url: http://git.cyclocoop.org/data/%24oldEdit?a=commitdiff_plain;h=924080c0f96d491bc3ff7c98bdb4d6ed492f3955;p=lhc%2Fweb%2Fwiklou.git Make TitleInputWidget configurable, if term should be highlighted or not Depends on: I36502da43c383373 Bug: T106273 Change-Id: I393eef9cd20bdf80e4db72891f23de08bcdfd376 --- diff --git a/includes/widget/TitleInputWidget.php b/includes/widget/TitleInputWidget.php index 5550a21553..25030b1a60 100644 --- a/includes/widget/TitleInputWidget.php +++ b/includes/widget/TitleInputWidget.php @@ -39,6 +39,9 @@ class TitleInputWidget extends \OOUI\TextInputWidget { if ( isset( $config['suggestions'] ) ) { $this->suggestions = $config['suggestions']; } + if ( isset( $config['highlightFirst'] ) ) { + $this->highlightFirst = $config['highlightFirst']; + } // Initialization $this->addClasses( array( 'mw-widget-titleInputWidget' ) ); @@ -58,6 +61,9 @@ class TitleInputWidget extends \OOUI\TextInputWidget { if ( $this->suggestions !== null ) { $config['suggestions'] = $this->suggestions; } + if ( $this->highlightFirst !== null ) { + $config['highlightFirst'] = $this->highlightFirst; + } return parent::getConfig( $config ); } }