IcingaServiceForm: remove duplicate code

Elements in this list are optional and may be used in various forms,
so keeping this in the base class is preferrable here
This commit is contained in:
Thomas Gelf 2016-10-21 21:22:12 +00:00
parent 5b4e7509f4
commit 7c31b37f27
2 changed files with 1 additions and 39 deletions

View File

@ -237,45 +237,6 @@ class IcingaServiceForm extends DirectorObjectForm
return $this;
}
protected function groupMainProperties()
{
$elements = array(
'imports',
'object_name',
'display_name',
'host_id',
'address',
'address6',
'groups',
'users',
'user_groups',
'apply_to',
'command_id', // Notification
'notification_interval',
'period_id',
'times_begin',
'times_end',
'email',
'pager',
'enable_notifications',
'create_live',
'disabled',
'apply_for'
);
$this->addDisplayGroup($elements, 'object_definition', array(
'decorators' => array(
'FormElements',
array('HtmlTag', array('tag' => 'dl')),
'Fieldset',
),
'order' => 20,
'legend' => $this->translate('Main properties')
));
return $this;
}
protected function addApplyForElement()
{
if ($this->object->isApplyRule()) {

View File

@ -311,6 +311,7 @@ abstract class DirectorObjectForm extends QuickForm
'email',
'pager',
'enable_notifications',
'apply_for',
'create_live',
'disabled',
);