They inherited getInputOOUI() from their respective parents, which
obviously didn't work correctly. These shouldn't be inheriting from
incompatible parents, probably… but meh.
Change-Id: Id99ee74c4efd27fab0ee32555723a02df8015458
A reason on a SelectAndOtherField can have two parts, one of the scroll
down box and a free text field. The free text field is actually
unlimited.
This patch allows the maxlength on that field. To respect the concat of
the two parts, also javascript code is added, which adds a dynamic
maxlength to respect also the text from the scroll down box.
The HTMLSelectAndOtherField is only used on Special:Block,
where the maxlength attribute is now set to 255 (length of the database
field ipb_reason).
Change-Id: I5c164b41ab047e7ecf9d92db6eddcc980e2db048
The other field is in most case the default item selected in the drop
down box when a page is loaded. But when the last item is selected you
have to scroll to the top to select one of the first item, which are
often the common or most used items.
So adding the 'other' always as first item to the list.
For the HTMLSelectAndOtherField this was before
If4175332405d26c7ff2e8fbe100bcad61762ce6f, so that is fixing a
regression. In my opinion it should be the same for both types.
Follow-Up: If4175332405d26c7ff2e8fbe100bcad61762ce6f
Change-Id: I82f31e260d63bfaa6a4a94908e019feb9e0f2421
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
There was only a empty item for that at the end of the drop down:
<option value="other" selected=""></option>
Follow-Up: If4175332405d26c7ff2e8fbe100bcad61762ce6f
Change-Id: If808c51c62b5c25a58ec6188784da5a676f60993
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