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

37 lines
1.1 KiB
PHP
Raw Normal View History

2015-07-03 10:49:12 +02:00
<?php
namespace Icinga\Module\Director\Forms;
use Icinga\Module\Director\Web\Form\QuickForm;
2015-07-03 10:49:12 +02:00
class DirectorDatafieldForm extends QuickForm
2015-07-03 10:49:12 +02:00
{
public function setup()
{
$this->addElement('text', 'varname', array(
2015-07-03 11:41:47 +02:00
'label' => $this->translate('Field name'),
'description' => $this->translate('The unique name of the field')
2015-07-03 10:49:12 +02:00
));
$this->addElement('text', 'caption', array(
2015-07-03 11:41:47 +02:00
'label' => $this->translate('Caption'),
'description' => $this->translate('The caption which should be displayed')
2015-07-03 10:49:12 +02:00
));
$this->addElement('textarea', 'description', array(
2015-07-03 11:41:47 +02:00
'label' => $this->translate('Description'),
'description' => $this->translate('A description about the field')
2015-07-03 10:49:12 +02:00
));
$this->addElement('text', 'datatype', array(
2015-07-03 11:41:47 +02:00
'label' => $this->translate('Data type'),
'description' => $this->translate('Field format')
2015-07-03 10:49:12 +02:00
));
$this->addElement('text', 'format', array(
'label' => $this->translate('Format'),
'description' => $this->translate('Field format')
));
}
}