Commit graph

6 commits

Author SHA1 Message Date
Brad Jorsch
7fdbe15fb6 HTMLForm: Allow returning Message objects from HTMLFormField::validate()
It mostly already worked. HTMLForm::trySubmit() needed a little
adjustment to handle things properly.

Change-Id: Ibb17bb61ac0b2d41953249980bc2f23b8a3ae5b6
2016-11-14 13:25:14 -05:00
addshore
63dd31cd31 Add access modifiers to htmlform classes
Change-Id: Id8c0f0676b3200993af3cec493efc99839211bcc
2016-11-04 11:40:42 +01:00
Bartosz Dziewoński
96ef35a58a HTMLForm: Add OOUI support for 'multiselect' with 'dropdown' => true
Using CapsuleMultiselectWidget.

Change-Id: I816739bc3acd40ee9d8b67e19ff3e4296fce66d3
2016-10-04 19:50:44 +02:00
Bartosz Dziewoński
d23ebca2b9 HTMLFormField: Move 'flatlist' handling to fields that use it and document
Change-Id: I5dc6ad71880a741c41757bc64d236971edfbabfa
2016-08-24 15:22:32 +00:00
Bartosz Dziewoński
7191028ade HTMLMultiSelectField: Add 'dropdown' option for 'mw-chosen' behavior and document
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
2016-08-22 17:58:53 +00:00
Bartosz Dziewoński
15692fa6d4 Move HTMLFormField subclasses to a separate directory
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)