[refactor] Drop form-id template property

In preparation for using the SkinMustache class and
core buildSearchProps method [1],
and to reduce the risk of that change,
move the ID from the template
data to the template itself:

[1] https://github.com/wikimedia/mediawiki/blob/master/includes/skins/SkinMustache.php#L93

Change-Id: I8d62ea6b1adf6ef0cbfa20e1876806eba70b169f
This commit is contained in:
jdlrobson 2020-06-17 11:06:45 -07:00 committed by Jdlrobson
parent 16abb4ff84
commit 87f08dcf5b
4 changed files with 1 additions and 4 deletions

View File

@ -498,7 +498,6 @@ class VectorTemplate extends BaseTemplate {
$config = $this->getConfig();
$props = [
'form-action' => $config->get( 'Script' ),
'form-id' => 'simpleSearch',
'html-button-search-fallback' => $this->makeSearchButton(
'fulltext',
[ 'id' => 'mw-searchButton', 'class' => 'searchButton mw-fallbackSearchButton' ]

View File

@ -6,7 +6,7 @@
<label for="searchInput">{{msg-search}}</label>
</h3>
<form action="{{form-action}}" id="searchform">
<div id="{{form-id}}">
<div id="simpleSearch">
{{{html-input}}}
<input type="hidden" name="title" value="{{page-title}}">
{{! We construct two buttons (for 'go' and 'fulltext' search modes), but only one will be

View File

@ -10,7 +10,6 @@ export const searchBoxData = {
'form-action': '/w/index.php',
'html-userlangattributes': htmluserlangattributes,
'msg-search': 'Search',
'form-id': 'simpleSearch',
'html-input': '<input type="search" name="search" placeholder="Search Wikipedia" title="Search Wikipedia [⌃⌥f]" accesskey="f" id="searchInput" autocomplete="off">',
'page-title': 'Special:Search',
'html-button-search-fallback': '<input type="submit" name="fulltext" value="Search" title="Search pages for this text" id="mw-searchButton" class="searchButton mw-fallbackSearchButton"/>',

View File

@ -42,7 +42,6 @@
* @prop {string|null} msg-search
* @prop {string} [html-userlangattributes]
* @prop {string} form-action URL
* @prop {string} form-id
* @prop {string|null} html-input
* @prop {string|null} page-title the title of the search page
* @prop {string|null} html-button-search-fallback