diff --git a/library/Director/Web/Form/DirectorObjectForm.php b/library/Director/Web/Form/DirectorObjectForm.php index 13ebd826..42b8368b 100644 --- a/library/Director/Web/Form/DirectorObjectForm.php +++ b/library/Director/Web/Form/DirectorObjectForm.php @@ -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()); }