mediawiki-extensions-Replac.../resources
Timo Tijhof 3a6f634385 SpecialReplaceText: Migrate deprecated Xml usage to Html class
```
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
2024-03-27 03:07:52 +00:00
..
ext.ReplaceText.js SpecialReplaceText: Migrate deprecated Xml usage to Html class 2024-03-27 03:07:52 +00:00
ext.ReplaceTextStyles.less Use user interface instead of content language for RTL flipping 2023-10-21 13:42:18 +00:00