A form is "submitted" when it was "sent" but no submit label was set

This enables us to use handleRequest() as is when no specific submit button
is required.

refs #5525
This commit is contained in:
Johannes Meyer 2014-08-27 10:28:50 +02:00
parent 0ff79b0948
commit 6783d51f76
1 changed files with 1 additions and 1 deletions

View File

@ -373,7 +373,7 @@ class Form extends Zend_Form
$formData = $this->getRequestData($request);
if ($this->wasSent($formData)) {
$this->populate($formData); // Necessary to get isSubmitted() to work
if ($this->isSubmitted()) {
if ($this->isSubmitted() || ! $this->getSubmitLabel()) {
if ($this->isValid($formData) && $this->onSuccess($request)) {
$this->getResponse()->redirectAndExit($this->getRedirectUrl());
}