2015-06-02 14:19:05 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Icinga\Module\Director\Forms;
|
|
|
|
|
|
|
|
use Icinga\Module\Director\Web\Form\DirectorObjectForm;
|
|
|
|
|
2015-06-12 12:07:53 +02:00
|
|
|
class IcingaUserGroupForm extends DirectorObjectForm
|
2015-06-02 14:19:05 +02:00
|
|
|
{
|
|
|
|
public function setup()
|
|
|
|
{
|
2016-03-05 10:36:19 +01:00
|
|
|
$this->addHidden('object_type', 'object');
|
|
|
|
|
2015-07-30 11:33:08 +02:00
|
|
|
$this->addElement('text', 'object_name', array(
|
|
|
|
'label' => $this->translate('Usergroup'),
|
|
|
|
'required' => true,
|
2016-03-09 20:55:26 +01:00
|
|
|
'description' => $this->translate('Icinga object name for this user group')
|
2015-06-02 14:19:05 +02:00
|
|
|
));
|
|
|
|
|
2016-03-09 20:55:26 +01:00
|
|
|
$this->addGroupDisplayNameElement()
|
2017-01-24 18:29:40 +01:00
|
|
|
// TODO: re-add this once we have zone_id in groups tables
|
|
|
|
// ->addZoneElements()
|
2016-11-02 18:04:35 +01:00
|
|
|
->groupMainProperties()
|
2016-03-09 20:55:26 +01:00
|
|
|
->setButtons();
|
2015-06-02 14:19:05 +02:00
|
|
|
}
|
2016-11-02 18:04:35 +01:00
|
|
|
|
|
|
|
protected function addZoneElements()
|
|
|
|
{
|
|
|
|
$this->addZoneElement();
|
|
|
|
$this->addDisplayGroup(array('zone_id'), 'clustering', array(
|
|
|
|
'decorators' => array(
|
|
|
|
'FormElements',
|
|
|
|
array('HtmlTag', array('tag' => 'dl')),
|
|
|
|
'Fieldset',
|
|
|
|
),
|
|
|
|
'order' => 80,
|
|
|
|
'legend' => $this->translate('Zone settings')
|
|
|
|
));
|
|
|
|
|
|
|
|
return $this;
|
|
|
|
}
|
2015-06-02 14:19:05 +02:00
|
|
|
}
|