DirectorObjectForm: workaround to move submit button

This commit is contained in:
Thomas Gelf 2015-06-30 11:37:35 +02:00
parent 628d7c3221
commit d3f4625d7c
1 changed files with 9 additions and 0 deletions

View File

@ -183,6 +183,11 @@ abstract class DirectorObjectForm extends QuickForm
$this->addHidden('id');
}
$this->setDefaults($this->object->getProperties());
if ($submit = $this->getElement('submit')) {
$this->removeElement('submit');
}
if ($this->object->supportsGroups()) {
$this->getElement('groups')->setValue(
implode(', ', $this->object->groups()->listGroupNames())
@ -201,6 +206,10 @@ abstract class DirectorObjectForm extends QuickForm
}
}
if ($submit) {
$this->addElement($submit);
}
if (! $this->hasBeenSubmitted()) {
$this->beforeValidation($this->object->getProperties());
}