2015-06-03 14:34:54 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Icinga\Module\Director\Forms;
|
|
|
|
|
|
|
|
use Icinga\Module\Director\Web\Form\DirectorObjectForm;
|
|
|
|
|
|
|
|
class IcingaServiceForm extends DirectorObjectForm
|
|
|
|
{
|
|
|
|
public function setup()
|
|
|
|
{
|
2015-07-30 16:50:48 +02:00
|
|
|
$this->addElement('text', 'object_name', array(
|
|
|
|
'label' => $this->translate('Name'),
|
|
|
|
'required' => true,
|
|
|
|
'description' => $this->translate('Name for the Icinga object you are going to create')
|
2015-06-03 14:34:54 +02:00
|
|
|
));
|
|
|
|
|
2015-07-31 17:36:00 +02:00
|
|
|
/*
|
2015-06-17 11:11:25 +02:00
|
|
|
$this->addElement('text', 'groups', array(
|
|
|
|
'label' => $this->translate('Servicegroups'),
|
|
|
|
'description' => $this->translate('One or more comma separated servicegroup names')
|
|
|
|
));
|
2015-07-31 17:36:00 +02:00
|
|
|
*/
|
|
|
|
|
2015-07-30 16:50:48 +02:00
|
|
|
$this->addImportsElement();
|
2015-12-02 03:07:28 +01:00
|
|
|
$this->addCheckCommandElements();
|
|
|
|
|
2015-06-26 16:20:16 +02:00
|
|
|
|
2015-07-30 16:50:48 +02:00
|
|
|
if ($this->isTemplate()) {
|
2015-07-31 16:59:56 +02:00
|
|
|
$this->addCheckExecutionElements();
|
2015-07-30 16:50:48 +02:00
|
|
|
}
|
2015-10-15 23:53:59 +02:00
|
|
|
|
|
|
|
$this->setButtons();
|
2015-06-03 14:34:54 +02:00
|
|
|
}
|
|
|
|
}
|