DbSelectorForm: do not believe to be submitted...

...when another form has been sent
This commit is contained in:
Thomas Gelf 2018-10-05 05:54:53 +02:00
parent fb3bc190eb
commit 3d26ab127f

View File

@ -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'));