diff --git a/application/forms/IcingaServiceForm.php b/application/forms/IcingaServiceForm.php index 9388ddf0..5f128453 100644 --- a/application/forms/IcingaServiceForm.php +++ b/application/forms/IcingaServiceForm.php @@ -36,12 +36,29 @@ class IcingaServiceForm extends DirectorObjectForm ->addGroupsElement() ->addDisabledElement() ->groupMainProperties() + ->addAssignmentElements() ->addCheckCommandElements() ->addCheckExecutionElements() ->addAgentAndZoneElements() ->setButtons(); } + protected function addAssignmentElements() + { + if (!$this->object || !$this->object->isApplyRule()) { + return $this; + } + + $sub = new AssignListSubForm(); + $sub->setObject($this->getObject()); + $sub->setup(); + $sub->setOrder(30); + + $this->addSubForm($sub, 'assignlist'); + + return $this; + } + protected function setupHostRelatedElements() { $this->addHidden('host_id', $this->host->id);