Fix that a form's submit button is not being sent when the method is GET
fixes #6890
This commit is contained in:
parent
143db976ef
commit
7958a81975
|
@ -355,12 +355,20 @@
|
|||
$target = self.getLinkTargetFor($form);
|
||||
|
||||
if (method === 'GET') {
|
||||
url = icinga.utils.addUrlParams(url, $form.serializeObject());
|
||||
var dataObj = $form.serializeObject();
|
||||
|
||||
if (typeof autosubmit === 'undefined' || ! autosubmit) {
|
||||
if ($button.length && $button.attr('name') !== 'undefined') {
|
||||
dataObj[$button.attr('name')] = $button.attr('value');
|
||||
}
|
||||
}
|
||||
|
||||
url = icinga.utils.addUrlParams(url, dataObj);
|
||||
} else {
|
||||
data = $form.serializeArray();
|
||||
|
||||
if (typeof autosubmit === 'undefined' || ! autosubmit) {
|
||||
if ($button.length) {
|
||||
if ($button.length && $button.attr('name') !== 'undefined') {
|
||||
data.push({
|
||||
name: $button.attr('name'),
|
||||
value: $button.attr('value')
|
||||
|
|
Loading…
Reference in New Issue