timeperiod: remove legacy options

This commit is contained in:
Thomas Gelf 2015-12-02 21:12:55 +01:00
parent be4bfbb37d
commit 269ae11ec4
2 changed files with 6 additions and 13 deletions

View File

@ -10,13 +10,13 @@ class IcingaTimePeriodForm extends DirectorObjectForm
{ {
$isTemplate = isset($_POST['object_type']) && $_POST['object_type'] === 'template'; $isTemplate = isset($_POST['object_type']) && $_POST['object_type'] === 'template';
$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('Whether this should be a template'), 'description' => $this->translate('Whether this should be a template'),
'multiOptions' => array( 'class' => 'autosubmit',
null => '- please choose -', 'multiOptions' => $this->optionalEnum(array(
'object' => 'Timeperiod object', 'object' => $this->translate('Timeperiod object'),
'template' => 'Timeperiod template', 'template' => $this->translate('Timeperiod template'),
) ))
)); ));
if ($isTemplate) { if ($isTemplate) {
@ -43,7 +43,6 @@ class IcingaTimePeriodForm extends DirectorObjectForm
'description' => $this->translate('the update method'), 'description' => $this->translate('the update method'),
)); ));
$this->addZoneElement();
$this->addImportsElement(); $this->addImportsElement();
} }
} }

View File

@ -16,7 +16,6 @@ class IcingaTimePeriodTable extends QuickTable
'id' => 't.id', 'id' => 't.id',
'timeperiod' => 't.object_name', 'timeperiod' => 't.object_name',
'display_name' => 't.display_name', 'display_name' => 't.display_name',
'zone' => 'z.object_name',
); );
} }
@ -31,7 +30,6 @@ class IcingaTimePeriodTable extends QuickTable
return array( return array(
'timeperiod' => $view->translate('Timeperiod'), 'timeperiod' => $view->translate('Timeperiod'),
'display_name' => $view->translate('Display Name'), 'display_name' => $view->translate('Display Name'),
'zone' => $view->translate('Zone'),
); );
} }
@ -41,10 +39,6 @@ class IcingaTimePeriodTable extends QuickTable
$query = $db->select()->from( $query = $db->select()->from(
array('t' => 'icinga_timeperiod'), array('t' => 'icinga_timeperiod'),
array() array()
)->joinLeft(
array('z' => 'icinga_zone'),
't.zone_id = z.id',
array()
); );
return $query; return $query;