- Add @param annotation for $params variable for __construct() method
in the HTMLExpiryField class.
- Add @throws annotation for getOptionsOOUI() method that throws a
MWException and remove "@return array" as this method only throw an
exception now.
Change-Id: I292f6ae04b840f6f6f74b7c92f834f056659fbe2
Now it behaves more like HTMLCheckField: if there is clearly a value
submitted, it will load it.
Setting wpFormIdentifier is still needed for forms with default-on
checkboxes (without form identifier, it is impossible to distinguish a
page view without form submission, and form submission with default-on
checkbox unchecked).
In particular, this fixes the 'Show additional logs' checkboxes on
Special:Log: they no longer get unchecked after form submission.
Change-Id: Ief74a7e424b37ccd44759133b3cb8665275314a6
Directly use the UTF-8 encoding of the 'NO-BREAK SPACE' (U+00A0) instead of
the HTML/XML entities   or   or .
With the UTF-8 character the generated HTML is shorter and better to read.
Also change the special value for the label in HTMLForm from   to
U+00A0 but also support   for backward compability.
Bug: T154300
Change-Id: I882599ac1120789bb4e524c4394870680caca4f4
The resulting HTML makes very little sense semantically, but no
worries, because so does the existing one for non-OOUI forms.
Change-Id: I99bf6341c58869f6322b9d9c780d9c66739d00b6
Values returned by `Linker::tooltipAndAccesskeyAttribs()` and
`Linker::titleAttrib( ..., 'withaccess' )` include an accesskey
hint in the title text. This is unnecessary when used for OOjs UI
widgets, since after the changes from T168408 they display an
accesskey hint automatically.
Also fixed some other accesskey bugs in HTMLForm which probably
no one ever ran into.
Bug: T168408
Change-Id: I63285b5bce3341875a6d82eba059623bf105ca62
Most of these are simply changing annotations to reflect
reality. If a function can return false to indicate failure
the @return should indicate it.
Some are fixing preg_match calls, preg match returns 1, 0 or false,
but the functions all claim to return booleans.
This is far from all the incorrect return types in mediawiki, there
are around 250 detected by phan, but have to start somewhere.
Change-Id: I1bbdfee6190747bde460f8a7084212ccafe169ef
It mostly already worked. HTMLForm::trySubmit() needed a little
adjustment to handle things properly.
Change-Id: Ibb17bb61ac0b2d41953249980bc2f23b8a3ae5b6
Previously, you could pass 'cssclass' => 'mw-chosen' in the form
descriptor for a 'multiselect' field, and it'd be automatically
converted to a text field with a dropdown allowing values to be
selected. This is not very intuitive (unless you know what the Chosen
library is) and was not documented anywhere except for release notes.
The new recommended and documented way to achieve this is by passing
'dropdown' => true. Old way is supported for backwards compatibility.
Also, add the 'jquery.chosen' module to the page server-side.
Change-Id: I3a025e1c3c7571e930a35e020d73d558fdc433d0
It's getting more difficult to navigate the files in includes/htmlform/
with every new field and every new helper class that is being added.
Change-Id: I92ce2356baf6151f17b2440970d5abdf86503820
2016-08-01 07:58:56 +00:00
Renamed from includes/htmlform/HTMLMultiSelectField.php (Browse further)