mirror of
https://github.com/Combodo/iTop.git
synced 2026-03-02 07:34:13 +01:00
Add default value for max_items_selected
This commit is contained in:
@@ -19,7 +19,7 @@ class TomSelectElement extends HTMLSelectElement {
|
||||
if (this.getAttribute('data-tom-select-disable-auto-complete')) {
|
||||
options.controlInput = null;
|
||||
}
|
||||
if (this.getAttribute('data-tom-select-max-items-selected')) {
|
||||
if (this.getAttribute('data-tom-select-max-items-selected') && this.getAttribute('data-tom-select-max-items-selected') !== '') {
|
||||
options.maxItems = parseInt(this.getAttribute('data-tom-select-max-items-selected'));
|
||||
}
|
||||
if (this.getAttribute('data-tom-select-placehelder')) {
|
||||
|
||||
@@ -36,7 +36,7 @@ class ChoiceFormType extends AbstractType
|
||||
|
||||
// options to control the inline display of choices
|
||||
$resolver->setDefault('inline_display', true);
|
||||
$resolver->setDefined('max_items_selected');
|
||||
$resolver->setDefault('max_items_selected', '');
|
||||
$resolver->setDefault('disable_auto_complete', true);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user