DirectorObjectForm: workaround to move submit button
This commit is contained in:
parent
628d7c3221
commit
d3f4625d7c
|
@ -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());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue