mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-23 13:54:26 +02:00
parent
880a0a254f
commit
235e75d054
@ -1143,7 +1143,7 @@ class Form extends Zend_Form
|
|||||||
}
|
}
|
||||||
|
|
||||||
$formData = $this->getRequestData();
|
$formData = $this->getRequestData();
|
||||||
if ($this->getIsApiTarget() || $this->getUidDisabled() || $this->wasSent($formData)) {
|
if ($this->getIsApiTarget() || $this->getRequest()->isApiRequest() || $this->getUidDisabled() || $this->wasSent($formData)) {
|
||||||
if (($frameUpload = (bool) $request->getUrl()->shift('_frameUpload', false))) {
|
if (($frameUpload = (bool) $request->getUrl()->shift('_frameUpload', false))) {
|
||||||
$this->getView()->layout()->setLayout('wrapped');
|
$this->getView()->layout()->setLayout('wrapped');
|
||||||
}
|
}
|
||||||
@ -1172,7 +1172,7 @@ class Form extends Zend_Form
|
|||||||
} else {
|
} else {
|
||||||
$this->getView()->layout()->redirectUrl = $this->getRedirectUrl()->getAbsoluteUrl();
|
$this->getView()->layout()->redirectUrl = $this->getRedirectUrl()->getAbsoluteUrl();
|
||||||
}
|
}
|
||||||
} elseif ($this->getIsApiTarget()) {
|
} elseif ($this->getIsApiTarget() || $this->getRequest()->isApiRequest()) {
|
||||||
$this->getResponse()->json()->setFailData($this->getMessages())->sendResponse();
|
$this->getResponse()->json()->setFailData($this->getMessages())->sendResponse();
|
||||||
}
|
}
|
||||||
} elseif ($this->getValidatePartial()) {
|
} elseif ($this->getValidatePartial()) {
|
||||||
@ -1198,7 +1198,7 @@ class Form extends Zend_Form
|
|||||||
if (strtolower($this->getRequest()->getMethod()) !== $this->getMethod()) {
|
if (strtolower($this->getRequest()->getMethod()) !== $this->getMethod()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if ($this->getIsApiTarget()) {
|
if ($this->getIsApiTarget() || $this->getRequest()->isApiRequest()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if ($this->getSubmitLabel()) {
|
if ($this->getSubmitLabel()) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user