From 924080c0f96d491bc3ff7c98bdb4d6ed492f3955 Mon Sep 17 00:00:00 2001 From: Florian Date: Fri, 6 Nov 2015 18:17:29 +0100 Subject: [PATCH] Make TitleInputWidget configurable, if term should be highlighted or not Depends on: I36502da43c383373 Bug: T106273 Change-Id: I393eef9cd20bdf80e4db72891f23de08bcdfd376 --- includes/widget/TitleInputWidget.php | 6 ++++++ 1 file changed, 6 insertions(+) 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 ); } } -- 2.20.1