mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-27 15:54:03 +02:00
parent
c1d9cde312
commit
6d4d99aa62
@ -272,14 +272,14 @@
|
|||||||
url = icinga.utils.addUrlParams(url, dataObj);
|
url = icinga.utils.addUrlParams(url, dataObj);
|
||||||
} else {
|
} else {
|
||||||
if (encoding === 'multipart/form-data') {
|
if (encoding === 'multipart/form-data') {
|
||||||
data = new FormData($form[0]);
|
data = new window.FormData($form[0]);
|
||||||
} else {
|
} else {
|
||||||
data = $form.serializeArray();
|
data = $form.serializeArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeof autosubmit === 'undefined' || ! autosubmit) {
|
if (typeof autosubmit === 'undefined' || ! autosubmit) {
|
||||||
if ($button.length && $button.attr('name') !== 'undefined') {
|
if ($button.length && $button.attr('name') !== 'undefined') {
|
||||||
if (data instanceof FormData) {
|
if (encoding === 'multipart/form-data') {
|
||||||
data.append($button.attr('name'), $button.attr('value'));
|
data.append($button.attr('name'), $button.attr('value'));
|
||||||
} else {
|
} else {
|
||||||
data.push({
|
data.push({
|
||||||
|
@ -103,7 +103,7 @@
|
|||||||
// This is jQuery's default content type
|
// This is jQuery's default content type
|
||||||
var contentType = 'application/x-www-form-urlencoded; charset=UTF-8';
|
var contentType = 'application/x-www-form-urlencoded; charset=UTF-8';
|
||||||
|
|
||||||
var isFormData = data instanceof FormData;
|
var isFormData = data instanceof window.FormData;
|
||||||
if (isFormData) {
|
if (isFormData) {
|
||||||
// Setting false is mandatory as the form's data
|
// Setting false is mandatory as the form's data
|
||||||
// won't be recognized by the server otherwise
|
// won't be recognized by the server otherwise
|
||||||
|
Loading…
x
Reference in New Issue
Block a user