DirectorDatafieldForm: textarea height, code cleanup

This commit is contained in:
Thomas Gelf 2015-07-30 09:07:00 +02:00
parent ef28a18af2
commit 9cfaf4d71f
1 changed files with 8 additions and 7 deletions

View File

@ -10,19 +10,20 @@ class DirectorDatafieldForm extends DirectorObjectForm
public function setup() public function setup()
{ {
$this->addElement('text', 'varname', array( $this->addElement('text', 'varname', array(
'required' => true, 'label' => $this->translate('Field name'),
'label' => $this->translate('Field name'), 'description' => $this->translate('The unique name of the field'),
'description' => $this->translate('The unique name of the field') 'required' => true,
)); ));
$this->addElement('text', 'caption', array( $this->addElement('text', 'caption', array(
'label' => $this->translate('Caption'), 'label' => $this->translate('Caption'),
'description' => $this->translate('The caption which should be displayed') 'description' => $this->translate('The caption which should be displayed')
)); ));
$this->addElement('textarea', 'description', array( $this->addElement('textarea', 'description', array(
'label' => $this->translate('Description'), 'label' => $this->translate('Description'),
'description' => $this->translate('A description about the field') 'description' => $this->translate('A description about the field'),
'rows' => '3',
)); ));
$this->addElement('select', 'datatype', array( $this->addElement('select', 'datatype', array(
@ -30,7 +31,7 @@ class DirectorDatafieldForm extends DirectorObjectForm
'description' => $this->translate('Field type'), 'description' => $this->translate('Field type'),
'required' => true, 'required' => true,
'multiOptions' => $this->enumDataTypes(), 'multiOptions' => $this->enumDataTypes(),
'class' => 'autosubmit' 'class' => 'autosubmit',
)); ));
if ($class = $this->object()->datatype) { if ($class = $this->object()->datatype) {