X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fwidget%2FSearchInputWidget.php;h=773c291dfce06af2414b744cff6360885729b5a7;hp=47d3717b2835ad36ef57248db6d1dd87d492f830;hb=802c199d0bd80ff0f4d730c61fd58cbf08a52d8d;hpb=925fe0df015458a330d320c9f1a0014d32ff8866 diff --git a/includes/widget/SearchInputWidget.php b/includes/widget/SearchInputWidget.php index 47d3717b28..773c291dfc 100644 --- a/includes/widget/SearchInputWidget.php +++ b/includes/widget/SearchInputWidget.php @@ -10,17 +10,19 @@ namespace MediaWiki\Widget; /** * Search input widget. */ -class SearchInputWidget extends \OOUI\TextInputWidget { +class SearchInputWidget extends TitleInputWidget { protected $pushPending = false; protected $performSearchOnClick = true; + protected $validateTitle = false; + protected $highlightFirst = false; protected $dataLocation = 'header'; /** * @param array $config Configuration options * @param int|null $config['pushPending'] Whether the input should be visually marked as * "pending", while requesting suggestions (default: false) - * @param boolean|null $config['performSearchOnClick'] If true, the script will start a search + * @param bool|null $config['performSearchOnClick'] If true, the script will start a search * whenever a user hits a suggestion. If false, the text of the suggestion is inserted into the * text field only (default: true) * @param string $config['dataLocation'] Where the search input field will be @@ -28,6 +30,7 @@ class SearchInputWidget extends \OOUI\TextInputWidget { */ public function __construct( array $config = [] ) { $config = array_merge( [ + 'maxLength' => null, 'icon' => 'search', ], $config );