```
Xml::textarea( $name, $content, $cols = 40, $rows = 5, $attribs );
Xml::input( $name, $size = false, $value = false, $attribs );
Xml::checkLabel( $label, $name, $id, $checked = false, $attribs );
```
For examples of trouble with Xml::checkLabel, see also I61c8f67127 in
CentralAuth and I33bf6ab5e0 in MediaWiki core. For improved clarify,
I'm replacing most of these with Html::element().
While at it, I'm also migrating `<input id=…><label for=…>…</label>`
to the simpler `<label><input>…</label>` form where this is easy to
do.
ext.ReplaceTextStyles.less has styles for label/input inside
`.ext-replacetext-search-togglebox`, which this patch leaves unchanged.
ext.ReplaceText.js refers to the IDs of namespace checkboxes,
which this change keeps in-tact. In the future, the namespace
checkbox HTML could be simplified further if the JS code selects by
`name` instead of `id`.
Test Plan:
* Given `wfLoadExtension('ReplaceText');` in LocalSettings.php,
and a Main_Page containing the word "installed".
* View Special:ReplaceText, verify it renders without errors,
and each label is click-associated with its checkbox.
* Find "Main", Replace "Minor",
tick "(Main)" namespace, tick "Replace text in page titles".
* Continue
* Verify the checkboxes under "For moved pages:" are also
associated with their labels.
Change-Id: I2060961115b7af23dcf086ed03bfa3f159f5302c
Apply CSS coding conventions from:
https://www.mediawiki.org/wiki/Manual:Coding_conventions/CSS#Naming
* Use class instead of id.
* Use class names with the prefix "ext-replacetext-".
* Remove stylelint rule:
"selector-max-id": null
* Add stylelint rule:
"selector-class-pattern": "^client-nojs$|^ext-replacetext-"
Change-Id: Ia7e3d41030aba7287716a219acbe6115e8fcbe46
The core module 'mediawiki.special.search' contains more functions
which are not needed here and which causes an error message in the
JavaScript console. (T211384)
This change copies the used part of module 'mediawiki.special.search'
to the local module 'ext.ReplaceText'.
The CSS file for the style module 'ext.ReplaceTextStyles' is renamed
from ext.ReplaceText.css to ext.ReplaceTextStyles.css to make
ext.ReplaceText.css free for the CSS part of module 'ext.ReplaceText'.
Bug: T211384
Change-Id: I41225ccdf8a95a7c501fb6eea99abbd08353f4ea