diff --git a/application/forms/IcingaUserForm.php b/application/forms/IcingaUserForm.php index 447626a3..52aad1a8 100644 --- a/application/forms/IcingaUserForm.php +++ b/application/forms/IcingaUserForm.php @@ -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( diff --git a/application/forms/IcingaUserGroupForm.php b/application/forms/IcingaUserGroupForm.php index ff568a87..d98232e0 100644 --- a/application/forms/IcingaUserGroupForm.php +++ b/application/forms/IcingaUserGroupForm.php @@ -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; + } }