mediawiki-extensions-Templa.../modules/ext.templateDataGenerator.editTemplatePage
Thiemo Kreuz 5f749c6418 Allow aliases to be integers in addition to strings
Parameter names in a template can be numeric. While it makes a lot of
sense to force a specific format in the TemplateData JSON (i.e. only
strings), it's inconvenient and confusing if numbers are rejected for
being "invalid".

Effects of this patch:
* The incoming JSON is allowed to contain numbers in the aliases
  array.
* However, the API normalizes these and forces all aliases to be
  strings, as it was always documented.
* The editor component accepts anything in the aliases array, but
  forces all aliases to be strings. Again, as documented.
* Note that it was never possible to use numeric keys in the `params`
  list. This patch is only about aliases.

At the moment this is a somewhat "hidden" feature. We might or might
not update the documentation to officially allow numeric aliases.

Bug: T298795
Change-Id: I32ea296b4520e7f21b03a1f6390db4f43b613bdd
2022-01-10 13:33:27 +01:00
..
widgets Move var declarations inline 2021-10-05 17:37:33 +01:00
Dialog.js Allow aliases to be integers in addition to strings 2022-01-10 13:33:27 +01:00
init.js Move var declarations inline 2021-10-05 17:37:33 +01:00
Metrics.js Move var declarations inline 2021-10-05 17:37:33 +01:00
Target.js Move var declarations inline 2021-10-05 17:37:33 +01:00
templateDataGenerator.ui.css Migrate to package files: ext.templateDataGenerator.editTemplatePage 2020-12-04 19:41:50 +01:00