HTMLMultiSelectField: Add 'dropdown' option for 'mw-chosen' behavior and document
authorBartosz Dziewoński <matma.rex@gmail.com>
Mon, 8 Aug 2016 19:40:12 +0000 (21:40 +0200)
committerJforrester <jforrester@wikimedia.org>
Mon, 22 Aug 2016 17:58:53 +0000 (17:58 +0000)
commit7191028ade9c6bf83866259fc2d7e7dcd0ef16e9
tree8c5717921d52db6787646adb7117e82dff824bc2
parent6a366c3300f4aed78f846c09468daea7591a3a40
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
includes/htmlform/fields/HTMLMultiSelectField.php
resources/src/mediawiki/htmlform/multiselect.js