icingaweb2-module-director/application/forms/IcingaUserGroupForm.php

42 lines
1.1 KiB
PHP
Raw Normal View History

<?php
namespace Icinga\Module\Director\Forms;
use Icinga\Module\Director\Web\Form\DirectorObjectForm;
class IcingaUserGroupForm extends DirectorObjectForm
{
public function setup()
{
$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,
'description' => $this->translate('Icinga object name for this user group')
));
$this->addGroupDisplayNameElement()
// TODO: re-add this once we have zone_id in groups tables
// ->addZoneElements()
->groupMainProperties()
->setButtons();
}
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;
}
}