Depends on I0e5c956b9358b510c8473b1cfe6465ea1b5c07ef in OOjs UI.
This mostly reverts dd04b31052 and parts
of e85bd04bcd.
In addition to cleanup, it fixes bugs in HTMLFormFieldWithButton
(which did not add some attributes in OOUI mode) and HTMLMultiSelectField
(which did not do the mapping, losing some attributes in OOUI mode).
Change-Id: I0d1a5288e9edb73a0c3a8431feca9fcc67b72b6a
Broken with the switch to OOUI.
This also adds 'id' param to OOUI HTMLRadioField.
Follow-up to b51076a844.
Change-Id: I69c5fa9830a8b8b7cd6bf3468b5600325d34c070
$value is used in a foreach loop to build the radioselect fields array for OOUI,
but $value is also the variable, which holds the default value for the element
(or a value, which ws submitted by the user), to pre-select the correct radio input
field. That results in the problem, that $value will always contain the last data,
which passed the foreach loop, and always the last radio input field will be pre-
selected, no matter, what the developer defined as the default or what the user
submitted in a prior form instance.
Change the variable used in the foreach loop to avoid this conflict.
Change-Id: I36c760be8ccd86e75249c966f697b499576c83d4
Example usage in I2c3d6486e09b3e4d5537b95194e178fd73ac9792
(Special:PageLanguage). Trivial now that we have RadioSelectInputWidget
in OOUI (added in fd2815e372f6a4beb4f4e5f2a7d9cbf785d40851).
Depends on If68f04a2fa20e7c03763898ab80cf39b5e6cb182 in OOUI.
Bug: T98855
Change-Id: I224e591e58534c07af62eebb9ae4b185225edc33
Swapped some "$var type" to "type $var" or added missing types
before the $var. Changed some other types to match the more common
spelling. Makes beginning of some text in captial.
Change-Id: Ifbb1da2a6278b0bde2a6f6ce2e7bd383ee3fb28a
PHP, particularly with in_array, really has problems with integer 0
versus non-numeric strings. Let's clean that up by converting values to
strings more agressively and using the $strict option to in_array.
Oddly enough, the one place where strict in_array was being used already
broke when If4175332 stringified the values in one array but not the
other.
Bug: 62268
Change-Id: Id34e654eb8d0e70d093b11445273e542e491e265
One shortcoming in HTMLForm is that fields that use the 'options'
parameter (e.g. <select>) have no easy way for the individual labels to
be localized.
This change adds a new parameter type, 'options-messages', where the
keys are message keys rather than bare strings (similar to the
difference between 'label' and 'label-message'). It also abstracts out
the fetching of the various option parameters, and changes the necessary
field classes to use it.
Change-Id: If4175332405d26c7ff2e8fbe100bcad61762ce6f
It is already set for some fields in Special:Block, but are
discarded by HTMLForm and its fields.
Some notes:
- fields with multiple inputs (radio, select and other, select
or other) will have the same tabindex set on all elements
- Some items such as multi-select and check matrix are not yet
implemented
Change-Id: I3e1ba7f16f3a3183f231afcf60dd392ce6d6eb6b