From: Bartosz DziewoƄski Date: Mon, 8 Aug 2016 20:37:49 +0000 (+0200) Subject: HTMLForm: Add OOUI support for 'multiselect' with 'dropdown' => true X-Git-Tag: 1.31.0-rc.0~4977^2~1 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=96ef35a58ab1f12a8aa19053ace92a9f94bf0c7d;p=lhc%2Fweb%2Fwiklou.git HTMLForm: Add OOUI support for 'multiselect' with 'dropdown' => true Using CapsuleMultiselectWidget. Change-Id: I816739bc3acd40ee9d8b67e19ff3e4296fce66d3 --- diff --git a/includes/htmlform/fields/HTMLMultiSelectField.php b/includes/htmlform/fields/HTMLMultiSelectField.php index c9fcb0992f..fee5d6344a 100644 --- a/includes/htmlform/fields/HTMLMultiSelectField.php +++ b/includes/htmlform/fields/HTMLMultiSelectField.php @@ -120,6 +120,8 @@ class HTMLMultiSelectField extends HTMLFormField implements HTMLNestedFilterable * @return OOUI\CheckboxMultiselectInputWidget */ public function getInputOOUI( $value ) { + $this->mParent->getOutput()->addModules( 'oojs-ui-widgets' ); + $attr = $this->getTooltipAndAccessKey(); $attr['id'] = $this->mID; $attr['name'] = "{$this->mName}[]"; diff --git a/resources/src/mediawiki/htmlform/multiselect.js b/resources/src/mediawiki/htmlform/multiselect.js index a8786efa5b..9ab253262c 100644 --- a/resources/src/mediawiki/htmlform/multiselect.js +++ b/resources/src/mediawiki/htmlform/multiselect.js @@ -32,9 +32,9 @@ function convertCheckboxesToMulti( $oldContainer, type ) { var $fieldLabel = $( '' ), - $td = $( '' ), - $fieldLabelText = $( '