DirectorObjectForm: deletion check only when sent

This commit is contained in:
Thomas Gelf 2016-03-06 13:07:56 +01:00
parent cafd136232
commit 24f1580c92

View File

@ -619,12 +619,12 @@ abstract class DirectorObjectForm extends QuickForm
$values = array();
$object = $this->object();
if ($this->shouldBeDeleted()) {
$this->deleteObject($object);
}
if ($this->hasBeenSent()) {
if ($this->shouldBeDeleted()) {
$this->deleteObject($object);
}
$post = $this->getRequest()->getPost();
foreach ($post as $key => $value) {
$el = $this->getElement($key);