From 24f1580c92e474969983f08ca5a048bd794b6e1b Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Sun, 6 Mar 2016 13:07:56 +0100 Subject: [PATCH] DirectorObjectForm: deletion check only when sent --- library/Director/Web/Form/DirectorObjectForm.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/library/Director/Web/Form/DirectorObjectForm.php b/library/Director/Web/Form/DirectorObjectForm.php index 7dbba409..af015f14 100644 --- a/library/Director/Web/Form/DirectorObjectForm.php +++ b/library/Director/Web/Form/DirectorObjectForm.php @@ -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);