IcingaUer(Group)Form: allow to specify a zone

fixes #11754
This commit is contained in:
Thomas Gelf 2016-11-02 18:04:35 +01:00
parent 57e4c441bd
commit 984740db9a
2 changed files with 39 additions and 0 deletions

View File

@ -46,11 +46,32 @@ class IcingaUserForm extends DirectorObjectForm
->addDisplayNameElement()
->addEnableNotificationsElement()
->addDisabledElement()
->addZoneElements()
->addEventFilterElements()
->groupMainProperties()
->setButtons();
}
protected function addZoneElements()
{
if (! $this->isTemplate()) {
return $this;
}
$this->addZoneElement();
$this->addDisplayGroup(array('zone_id'), 'clustering', array(
'decorators' => array(
'FormElements',
array('HtmlTag', array('tag' => 'dl')),
'Fieldset',
),
'order' => 80,
'legend' => $this->translate('Zone settings')
));
return $this;
}
protected function addEnableNotificationsElement()
{
$this->optionalBoolean(

View File

@ -17,7 +17,25 @@ class IcingaUserGroupForm extends DirectorObjectForm
));
$this->addGroupDisplayNameElement()
->addZoneElements()
->groupMainProperties()
->setButtons();
}
protected function addZoneElements()
{
$this->addZoneElement();
$this->addDisplayGroup(array('zone_id'), 'clustering', array(
'decorators' => array(
'FormElements',
array('HtmlTag', array('tag' => 'dl')),
'Fieldset',
),
'order' => 80,
'legend' => $this->translate('Zone settings')
));
return $this;
}
}