mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-02 15:51:48 +03:00
added fix for doubled parameters
This commit is contained in:
parent
94243f0a3e
commit
54e5fae3de
@ -269,6 +269,7 @@
|
|||||||
self = this,
|
self = this,
|
||||||
params = {},
|
params = {},
|
||||||
formData = new FormData(),
|
formData = new FormData(),
|
||||||
|
doubledParams = {},
|
||||||
headers = {},
|
headers = {},
|
||||||
content = $(this).find('textarea.content').val(),
|
content = $(this).find('textarea.content').val(),
|
||||||
result_container = $('.result', $(this).parent());
|
result_container = $('.result', $(this).parent());
|
||||||
@ -338,7 +339,12 @@
|
|||||||
value = $('.value', $(this)).val();
|
value = $('.value', $(this)).val();
|
||||||
|
|
||||||
if (value) {
|
if (value) {
|
||||||
params[key] = value;
|
// temporary save all additional/doubled parameters
|
||||||
|
if (key in params) {
|
||||||
|
doubledParams[key] = value;
|
||||||
|
} else {
|
||||||
|
params[key] = value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -367,7 +373,12 @@
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// disable all the fields and buttons
|
// merge additional params back to real params object
|
||||||
|
if (!$.isEmptyObject(doubledParams)) {
|
||||||
|
$.extend(params, doubledParams);
|
||||||
|
}
|
||||||
|
|
||||||
|
// disable all the fiels and buttons
|
||||||
$('input, button', $(this)).attr('disabled', 'disabled');
|
$('input, button', $(this)).attr('disabled', 'disabled');
|
||||||
|
|
||||||
// append the query authentication
|
// append the query authentication
|
||||||
|
Loading…
x
Reference in New Issue
Block a user