mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-29 16:54:04 +02:00
Form: Don't transmit duplicate error messages
Zend_Form::getMessages() already returns custom error messages, if there are any
This commit is contained in:
parent
b93dc06f5b
commit
96c96df636
@ -1169,9 +1169,7 @@ class Form extends Zend_Form
|
|||||||
$this->getView()->layout()->redirectUrl = $this->getRedirectUrl()->getAbsoluteUrl();
|
$this->getView()->layout()->redirectUrl = $this->getRedirectUrl()->getAbsoluteUrl();
|
||||||
}
|
}
|
||||||
} elseif ($this->getIsApiTarget()) {
|
} elseif ($this->getIsApiTarget()) {
|
||||||
$this->getResponse()->json()->setFailData(
|
$this->getResponse()->json()->setFailData($this->getMessages())->sendResponse();
|
||||||
array_merge($this->getMessages(), $this->getErrorMessages())
|
|
||||||
)->sendResponse();
|
|
||||||
}
|
}
|
||||||
} elseif ($this->getValidatePartial()) {
|
} elseif ($this->getValidatePartial()) {
|
||||||
// The form can't be processed but we may want to show validation errors though
|
// The form can't be processed but we may want to show validation errors though
|
||||||
|
Loading…
x
Reference in New Issue
Block a user