From 360812b719211e8b1cdc0a631645c9968f457d3f Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Sat, 26 Mar 2016 16:18:50 +0100 Subject: [PATCH] IcingaServiceForm: push forgotten assignments --- application/forms/IcingaServiceForm.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) 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);