Web\Form: relax form submission check
We have to live with some badly designed forms right now. Some have submit buttons but don't know about, others don't have such but link to foreign controllers fiddling with the form and adding different button AFTER the form got submitted - it's a mess. Relaxing the submission check to "just check whether btn_submit has a value" fixes most of this. However I do not consider this being a solution for the long run. fixes #6423 fixes #5967 refs #6540
This commit is contained in:
parent
bde6e29c61
commit
ba9a633b73
|
@ -456,10 +456,8 @@ class Form extends Zend_Form
|
|||
|
||||
if ($this->submitLabel) {
|
||||
$checkData = $this->getRequest()->getParams();
|
||||
$label = isset($checkData['btn_submit']) ? $checkData['btn_submit'] : null;
|
||||
return $label === $this->submitLabel;
|
||||
return isset($checkData['btn_submit']) && $checkData['btn_submit'];
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue