application/forms: unify and clean up group forms
This commit is contained in:
parent
d8a3fb68bd
commit
be637551be
|
@ -13,12 +13,10 @@ class IcingaHostGroupForm extends DirectorObjectForm
|
|||
$this->addElement('text', 'object_name', array(
|
||||
'label' => $this->translate('Hostgroup'),
|
||||
'required' => true,
|
||||
'description' => $this->translate('Icinga object name for this hostgroup')
|
||||
'description' => $this->translate('Icinga object name for this host group')
|
||||
));
|
||||
|
||||
$this->addElement('text', 'display_name', array(
|
||||
'label' => $this->translate('Display Name'),
|
||||
'description' => $this->translate('The name which should displayed.')
|
||||
));
|
||||
$this->addGroupDisplayNameElement()
|
||||
->setButtons();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,15 +9,14 @@ class IcingaServiceGroupForm extends DirectorObjectForm
|
|||
public function setup()
|
||||
{
|
||||
$this->addHidden('object_type', 'object');
|
||||
|
||||
$this->addElement('text', 'object_name', array(
|
||||
'label' => $this->translate('Servicegroup'),
|
||||
'required' => true,
|
||||
'description' => $this->translate('Icinga object name for this servicegroup')
|
||||
'description' => $this->translate('Icinga object name for this service group')
|
||||
));
|
||||
|
||||
$this->addElement('text', 'display_name', array(
|
||||
'label' => $this->translate('Display Name'),
|
||||
'description' => $this->translate('The name which should displayed.')
|
||||
));
|
||||
$this->addGroupDisplayNameElement()
|
||||
->setButtons();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,14 +13,11 @@ class IcingaUserGroupForm extends DirectorObjectForm
|
|||
$this->addElement('text', 'object_name', array(
|
||||
'label' => $this->translate('Usergroup'),
|
||||
'required' => true,
|
||||
'description' => $this->translate('Icinga object name for this usergroup')
|
||||
'description' => $this->translate('Icinga object name for this user group')
|
||||
));
|
||||
|
||||
$this->addElement('text', 'display_name', array(
|
||||
'label' => $this->translate('Display Name'),
|
||||
'description' => $this->translate('The name which should displayed.')
|
||||
));
|
||||
$this->addGroupDisplayNameElement()
|
||||
->setButtons();
|
||||
|
||||
$this->setButtons();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -981,6 +981,18 @@ print_r($object);
|
|||
return $this;
|
||||
}
|
||||
|
||||
protected function addGroupDisplayNameElement()
|
||||
{
|
||||
$this->addElement('text', 'display_name', array(
|
||||
'label' => $this->translate('Display Name'),
|
||||
'description' => $this->translate(
|
||||
'An alternative display name for this group. If you wonder how this'
|
||||
. ' could be helpful just leave it blank')
|
||||
));
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
protected function addCheckCommandElements()
|
||||
{
|
||||
$this->addElement('select', 'check_command_id', array(
|
||||
|
|
Loading…
Reference in New Issue