DbSelectorForm: submission detection, once more

This commit is contained in:
Thomas Gelf 2018-10-05 07:53:02 +02:00
parent 3d26ab127f
commit e16d7865c7
1 changed files with 4 additions and 1 deletions

View File

@ -24,6 +24,9 @@ class DbSelectorForm extends Form
protected function assemble()
{
$this->addElement('DbSelector', 'hidden', [
'value' => 'sent'
]);
$this->addElement('db_resource', 'select', [
'options' => $this->allowedNames,
'class' => 'autosubmit',
@ -38,7 +41,7 @@ class DbSelectorForm extends Form
*/
public function hasBeenSubmitted()
{
return $this->hasBeenSent() && $this->getValue('db_resource');
return $this->hasBeenSent() && $this->getRequest()->get('DbSelector') === 'sent';
}
public function onSuccess()