DirectorObjectForm: add vars to fields group for now

This commit is contained in:
Thomas Gelf 2015-10-15 23:55:56 +02:00
parent f122fc3eb1
commit 4d72e315f2
1 changed files with 9 additions and 3 deletions

View File

@ -280,10 +280,9 @@ abstract class DirectorObjectForm extends QuickForm
}
if ($object->isTemplate()) {
$this->addHtml('<h3>Add a custom variable</h3>');
if (/* TODO: add free var */false && $object->isTemplate()) {
$this->addElement('text', '_newvar_name', array(
'label' => 'Name'
'label' => 'Add var'
));
$this->addElement('text', '_newvar_value', array(
'label' => 'Value'
@ -292,6 +291,13 @@ abstract class DirectorObjectForm extends QuickForm
'label' => 'Type',
'multiOptions' => array('string' => $this->translate('String'))
));
$this->addToFieldsDisplayGroup(
array(
'_newvar_name',
'_newvar_value',
'_newvar_format',
)
);
}
}