X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fwidget%2FSearchInputWidget.php;h=70b0dcc1bd1d7295224327b7eaaf9ff66a7396be;hb=7040be4f72b46a0052f8896ef462d8b98f45e157;hp=47d3717b2835ad36ef57248db6d1dd87d492f830;hpb=10d1b7d12b5d097413cd507740c5c71781c2580b;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/widget/SearchInputWidget.php b/includes/widget/SearchInputWidget.php index 47d3717b28..70b0dcc1bd 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,10 +30,10 @@ class SearchInputWidget extends \OOUI\TextInputWidget { */ public function __construct( array $config = [] ) { $config = array_merge( [ + 'maxLength' => null, 'icon' => 'search', ], $config ); - // Parent constructor parent::__construct( $config ); // Properties, which are ignored in PHP and just shipped back to JS