parent
02f9f49c7b
commit
099eca0d0b
|
@ -70,10 +70,30 @@ class IcingaCommandForm extends DirectorObjectForm
|
|||
)
|
||||
));
|
||||
$this->addDisabledElement();
|
||||
|
||||
$this->addZoneSection();
|
||||
$this->setButtons();
|
||||
}
|
||||
|
||||
protected function addZoneSection()
|
||||
{
|
||||
$this->addZoneElement(true);
|
||||
|
||||
$elements = array(
|
||||
'zone_id',
|
||||
);
|
||||
$this->addDisplayGroup($elements, 'clustering', array(
|
||||
'decorators' => array(
|
||||
'FormElements',
|
||||
array('HtmlTag', array('tag' => 'dl')),
|
||||
'Fieldset',
|
||||
),
|
||||
'order' => 80,
|
||||
'legend' => $this->translate('Zone settings')
|
||||
));
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
protected function enumAllowedTemplates()
|
||||
{
|
||||
$object = $this->object();
|
||||
|
|
|
@ -935,9 +935,9 @@ abstract class DirectorObjectForm extends QuickForm
|
|||
return ! $this->valueIsEmpty($this->getSentOrObjectValue('object_type'));
|
||||
}
|
||||
|
||||
protected function addZoneElement()
|
||||
protected function addZoneElement($all = false)
|
||||
{
|
||||
if ($this->isTemplate()) {
|
||||
if ($all || $this->isTemplate()) {
|
||||
$zones = $this->db->enumZones();
|
||||
} else {
|
||||
$zones = $this->db->enumNonglobalZones();
|
||||
|
|
Loading…
Reference in New Issue