Allow configuring the zone for notification templates

refs #594
This commit is contained in:
Tobias von der Krone 2017-03-14 20:47:02 +01:00 committed by Thomas Gelf
parent 58f77d39a9
commit 9a9886d263
1 changed files with 22 additions and 1 deletions

View File

@ -21,7 +21,7 @@ class IcingaNotificationForm extends DirectorObjectForm
'required' => true,
'description' => $this->translate('Icinga object name for this notification')
));
$this->addDisabledElement()
->addImportsElement()
->addUsersElement()
@ -33,10 +33,31 @@ class IcingaNotificationForm extends DirectorObjectForm
->addDisabledElement()
->addCommandElements()
->addEventFilterElements()
->addZoneElements()
->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;
}
/**
* @return self
*/