IcingaServiceForm: use new assign_filter property

This commit is contained in:
Thomas Gelf 2016-10-21 06:56:44 +00:00
parent 78a380811f
commit 3fbf3e9115

View File

@ -160,13 +160,28 @@ class IcingaServiceForm extends DirectorObjectForm
if (!$this->object || !$this->object->isApplyRule()) { if (!$this->object || !$this->object->isApplyRule()) {
return $this; return $this;
} }
$this->addElement('dataFilter', 'assign_filter', array(
'columns' => IcingaHost::enumProperties($this->db),
'required' => true,
));
$el = $this->getElement('assign_filter');
$el->setDecorators(array(
'ViewHelper',
array('HtmlTag', array(
'tag' => 'ul',
'class' => 'assign-rule required'
)),
));
$sub = $this->loadForm('assignListSub'); $this->addDisplayGroup(array($el), 'assign', array(
$sub->setObject($this->getObject()); 'decorators' => array(
$sub->setup(); 'FormElements',
$sub->setOrder(30); array('HtmlTag', array('tag' => 'dl')),
'Fieldset',
$this->addSubForm($sub, 'assignments'); ),
'order' => 30,
'legend' => $this->translate('Assign where')
));
return $this; return $this;
} }