OOUIHTMLForm: Make boolean form field parameters actually work everywhere
HTMLFormField::getAttributes() is unfortunately reused both for
generating HTML tag attributes and generating OOUI widget
configuration. For boolean ones passing '' for true (empty string)
works for HTML (where the attribute only has to be present), but not
for OOUI (where the configuration option has to be truthy).
It would be cleanest to pass true/false, which is the expected input
for OOUI widgets and which the Html class handles intuitively, but it
seems that these values often end up in the Xml class's methods
instead (somebody remind me why do we even have that?). So let's play
it safe and pass the name of the parameter instead, which is okay for
both HTML/XML (both disabled="" and disabled="disabled" work the same)
and OOUI widgets.
(Note also that the whole thing relies on the default value of these
boolean parameters/attributes being false.)
This was not spotted before because we had hacks for this problem in
all the important places. This commit reverts three such hacky
patches that missed the underlying problem:
*
e25eb30ea81eda82b57a4e3c84f4e1afdf3b6080
*
70910cd13cdb5d67f1dda2d9ccffbc8e30787352
*
8a164ff9f9f5b4691e40f1219358ca45c8b61c3d
Change-Id: Ic6a1f3758cba62147f7fe8127cc0a83c695b0212