From 3d26ab127f0472c3d252865a396fd68dccd0401a Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Fri, 5 Oct 2018 05:54:53 +0200 Subject: [PATCH] DbSelectorForm: do not believe to be submitted... ...when another form has been sent --- library/Director/Web/Form/DbSelectorForm.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/library/Director/Web/Form/DbSelectorForm.php b/library/Director/Web/Form/DbSelectorForm.php index a8ce1a2f..4ccde879 100644 --- a/library/Director/Web/Form/DbSelectorForm.php +++ b/library/Director/Web/Form/DbSelectorForm.php @@ -31,6 +31,16 @@ class DbSelectorForm extends Form ]); } + /** + * A base class should handle this, based on hidden fields + * + * @return bool + */ + public function hasBeenSubmitted() + { + return $this->hasBeenSent() && $this->getValue('db_resource'); + } + public function onSuccess() { $this->getSession()->set('db_resource', $this->getValue('db_resource'));