mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-31 01:34:12 +02:00
SyncRuleForm: cleanup
This commit is contained in:
parent
2e746e68c1
commit
f1c7509d5c
@ -10,15 +10,15 @@ class SyncRuleForm extends DirectorObjectForm
|
|||||||
public function setup()
|
public function setup()
|
||||||
{
|
{
|
||||||
$this->addElement('text', 'rule_name', array(
|
$this->addElement('text', 'rule_name', array(
|
||||||
'label' => $this->translate('Rule name'),
|
'label' => $this->translate('Rule name'),
|
||||||
'description' => $this->translate('Please provide a rule name'),
|
'description' => $this->translate('Please provide a rule name'),
|
||||||
'required' => true,
|
'required' => true,
|
||||||
));
|
));
|
||||||
|
|
||||||
$this->addElement('select', 'object_type', array(
|
$this->addElement('select', 'object_type', array(
|
||||||
'label' => $this->translate('Object Type'),
|
'label' => $this->translate('Object Type'),
|
||||||
'description' => $this->translate('Choose a object type'),
|
'description' => $this->translate('Choose a object type'),
|
||||||
'required' => true,
|
'required' => true,
|
||||||
'multiOptions' => $this->optionalEnum(array(
|
'multiOptions' => $this->optionalEnum(array(
|
||||||
'host' => $this->translate('Host'),
|
'host' => $this->translate('Host'),
|
||||||
'host_template' => $this->translate('Host Template'),
|
'host_template' => $this->translate('Host Template'),
|
||||||
@ -34,47 +34,29 @@ class SyncRuleForm extends DirectorObjectForm
|
|||||||
));
|
));
|
||||||
|
|
||||||
$this->addElement('select', 'update_policy', array(
|
$this->addElement('select', 'update_policy', array(
|
||||||
'label' => $this->translate('Update Policity'),
|
'label' => $this->translate('Update Policity'),
|
||||||
'description' => $this->translate('Whether the field should be merged, overriden or ignored'),
|
'description' => $this->translate('Whether the field should be merged, overriden or ignored'),
|
||||||
'required' => true,
|
'required' => true,
|
||||||
'multiOptions' => array(
|
'multiOptions' => $this->optionalEnum(array(
|
||||||
'null' => '- please choose -',
|
|
||||||
'merge' => 'merge',
|
'merge' => 'merge',
|
||||||
'override' => 'override',
|
'override' => 'override',
|
||||||
'ignore' => 'ignore'
|
'ignore' => 'ignore'
|
||||||
)
|
))
|
||||||
));
|
));
|
||||||
|
|
||||||
$this->addElement('select', 'purge_existing', array(
|
$this->addElement('select', 'purge_existing', array(
|
||||||
'label' => $this->translate('Purge'),
|
'label' => $this->translate('Purge'),
|
||||||
'description' => $this->translate('Purge existing values.'),
|
'description' => $this->translate('Purge existing values.'),
|
||||||
'required' => true,
|
'required' => true,
|
||||||
'multiOptions' => array(
|
'multiOptions' => $this->optionalEnum(array(
|
||||||
'null' => '- please choose -',
|
'y' => 'yes',
|
||||||
'y' => 'yes',
|
'n' => 'no'
|
||||||
'n' => 'no'
|
))
|
||||||
)
|
|
||||||
));
|
));
|
||||||
|
|
||||||
$this->addElement('text', 'filter_expression', array(
|
$this->addElement('text', 'filter_expression', array(
|
||||||
'label' => $this->translate('Filter Expression'),
|
'label' => $this->translate('Filter Expression'),
|
||||||
'description' => $this->translate('This allows to filter for specific parts.'),
|
'description' => $this->translate('This allows to filter for specific parts'),
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function loadObject($id)
|
|
||||||
{
|
|
||||||
parent::loadObject($id);
|
|
||||||
return $this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function onSuccess()
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
$this->getElement('owner')->setValue(
|
|
||||||
self::username()
|
|
||||||
);
|
|
||||||
*/
|
|
||||||
parent::onSuccess();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user