mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-30 01:04:12 +02:00
DirectorObjectForm: improve 'imports' element
This commit is contained in:
parent
70514adc70
commit
2826408c72
@ -892,6 +892,7 @@ print_r($object);
|
|||||||
. ' while not rendering and deploying them with the Director. Apply rules allow'
|
. ' while not rendering and deploying them with the Director. Apply rules allow'
|
||||||
. ' to assign services, notifications and groups to other objects.'
|
. ' to assign services, notifications and groups to other objects.'
|
||||||
),
|
),
|
||||||
|
'required' => true,
|
||||||
'multiOptions' => $this->optionalEnum($types),
|
'multiOptions' => $this->optionalEnum($types),
|
||||||
'class' => 'autosubmit'
|
'class' => 'autosubmit'
|
||||||
));
|
));
|
||||||
@ -933,10 +934,19 @@ print_r($object);
|
|||||||
|
|
||||||
protected function addImportsElement()
|
protected function addImportsElement()
|
||||||
{
|
{
|
||||||
|
$enum = $this->enumAllowedTemplates();
|
||||||
|
if (empty($enum)) {
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
$this->addElement('extensibleSet', 'imports', array(
|
$this->addElement('extensibleSet', 'imports', array(
|
||||||
'label' => $this->translate('Imports'),
|
'label' => $this->translate('Imports'),
|
||||||
'description' => $this->translate('Importable templates, choose one or more of them (CTRL/SHIFT click)'),
|
'description' => $this->translate(
|
||||||
'multiOptions' => $this->optionallyAddFromEnum($this->enumAllowedTemplates()),
|
'Importable templates, add as many as you want. Please note that order'
|
||||||
|
. ' matters when importing properting from multiple templates: last one'
|
||||||
|
. ' wins'
|
||||||
|
),
|
||||||
|
'multiOptions' => $this->optionallyAddFromEnum($enum),
|
||||||
'sorted' => true,
|
'sorted' => true,
|
||||||
'class' => 'autosubmit'
|
'class' => 'autosubmit'
|
||||||
));
|
));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user