HTMLRadioField: Do not automatically infuse our RadioSelectInputWidgets
authorBartosz Dziewoński <matma.rex@gmail.com>
Thu, 16 Nov 2017 16:14:29 +0000 (17:14 +0100)
committerBartosz Dziewoński <matma.rex@gmail.com>
Thu, 16 Nov 2017 16:33:03 +0000 (17:33 +0100)
commitf2a83fe4ac1c603b7f70d12566e5f8e9bcba1bcd
tree9e761724eac5aca0c34049466e0367c02c7cb1ae
parent9732ccc739b08d057ecd451b7e83674ca6630e20
HTMLRadioField: Do not automatically infuse our RadioSelectInputWidgets

This is really a workaround for an issue in a completely different place:
JS RadioSelectInputWidget internally uses `<input type="hidden">`
rather than real radio buttons, which does not work correctly with the
code in mediawiki.special.preferences.confirmClose.js. Ideally we would
change RadioSelectInputWidget to not do such weird things.

However, I think this is actually a good thing to do in general.
From the user's perspective, PHP RadioSelectInputWidget and JS
RadioSelectInputWidget look and behave the same, so there's no reason
to infuse and rebuild them.

This behavior was implemented in f50cee1375201a5d3fd76c0c262cfc7e66bd5d42
in which unfortunately I did not document the reason for it. For other
fields it makes obvious sense (the JS widgets have improvements like
autocompletion, or at least look "pretty"), but I have no idea why
I did it for this one.

Bug: T180643
Change-Id: I53e50f8cda39466b2396b374e642c154487888bb
includes/htmlform/fields/HTMLRadioField.php