2016-02-28 17:02:28 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Icinga\Module\Director\Forms;
|
|
|
|
|
|
|
|
use Icinga\Module\Director\Web\Form\DirectorObjectForm;
|
|
|
|
|
|
|
|
class IcingaNotificationForm extends DirectorObjectForm
|
|
|
|
{
|
|
|
|
public function setup()
|
|
|
|
{
|
|
|
|
$this->addObjectTypeElement();
|
2016-03-07 14:20:58 +01:00
|
|
|
if (! $this->hasObjectType()) {
|
2016-03-10 20:44:12 +01:00
|
|
|
$this->groupMainProperties();
|
2016-03-07 14:20:58 +01:00
|
|
|
return;
|
|
|
|
}
|
2016-02-28 17:02:28 +01:00
|
|
|
|
|
|
|
$this->addElement('text', 'object_name', array(
|
|
|
|
'label' => $this->translate('Notification'),
|
|
|
|
'required' => true,
|
|
|
|
'description' => $this->translate('Icinga object name for this notification')
|
|
|
|
));
|
|
|
|
|
2016-03-10 20:44:12 +01:00
|
|
|
$this->addDisabledElement()
|
|
|
|
->addImportsElement()
|
|
|
|
->addDisabledElement()
|
|
|
|
->addEventFilterElements()
|
|
|
|
->groupMainProperties()
|
|
|
|
->setButtons();
|
2016-02-28 17:02:28 +01:00
|
|
|
}
|
|
|
|
}
|