diff --git a/library/Director/Web/Form/IconHelper.php b/library/Director/Web/Form/IconHelper.php index d0a07669..3add09bf 100644 --- a/library/Director/Web/Form/IconHelper.php +++ b/library/Director/Web/Form/IconHelper.php @@ -30,6 +30,7 @@ class IconHelper 'angle-double-right' => 'e87b', 'up-big' => 'e825', 'down-big' => 'e828', + 'down-open' => 'e821', ); private $mappedUtf8Icons; diff --git a/library/Director/Web/Form/IplElement/ExtensibleSetElement.php b/library/Director/Web/Form/IplElement/ExtensibleSetElement.php index 4006169a..a719a3f7 100644 --- a/library/Director/Web/Form/IplElement/ExtensibleSetElement.php +++ b/library/Director/Web/Form/IplElement/ExtensibleSetElement.php @@ -273,10 +273,19 @@ class ExtensibleSetElement extends BaseElement $field->attributes()->add('class', 'extend-set'); } - $this->add(Html::tag('li', null, [ - $this->createAddNewButton(), - $field - ])); + if ($this->suggestionContext === null) { + $this->add(Html::tag('li', null, [ + $this->createAddNewButton(), + $field + ])); + } else { + $this->add(Html::tag('li', null, [ + $this->newInlineButtons( + $this->renderDropDownButton() + ), + $field + ])); + } } private function createAddNewButton() @@ -444,6 +453,16 @@ class ExtensibleSetElement extends BaseElement } } + private function renderDropDownButton() + { + return $this->createRelatedAction( + 'drop-down', + $this->name, + $this->translate('Show available options'), + 'down-open' + ); + } + private function renderAddButton() { return $this->createRelatedAction(