Skip to content

Commit

Permalink
A form is "submitted" when it was "sent" but no submit label was set
Browse files Browse the repository at this point in the history
This enables us to use handleRequest() as is when no specific submit button
is required.

refs #5525
  • Loading branch information
Johannes Meyer committed Aug 27, 2014
1 parent 0ff79b0 commit 6783d51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/Icinga/Web/Form.php
Expand Up @@ -373,7 +373,7 @@ public function handleRequest(Request $request = null)
$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());
}
Expand Down

0 comments on commit 6783d51

Please sign in to comment.