mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-30 01:04:12 +02:00
IcingaNotificationForm: do not show timeperiods...
...if no such is available
This commit is contained in:
parent
32009ce458
commit
eb1fbcdca2
@ -125,6 +125,11 @@ class IcingaNotificationForm extends DirectorObjectForm
|
|||||||
|
|
||||||
protected function addPeriodElement()
|
protected function addPeriodElement()
|
||||||
{
|
{
|
||||||
|
$periods = $this->db->enumTimeperiods();
|
||||||
|
if (empty($periods)) {
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
$this->addElement(
|
$this->addElement(
|
||||||
'select',
|
'select',
|
||||||
'period',
|
'period',
|
||||||
@ -133,7 +138,8 @@ class IcingaNotificationForm extends DirectorObjectForm
|
|||||||
'description' => $this->translate(
|
'description' => $this->translate(
|
||||||
'The name of a time period which determines when this'
|
'The name of a time period which determines when this'
|
||||||
. ' notification should be triggered. Not set by default.'
|
. ' notification should be triggered. Not set by default.'
|
||||||
)
|
),
|
||||||
|
'multiOptions' => $this->optionalEnum($periods),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user