modal.js: Don't disable inputs before the actual form submit is done
fixes Icinga/icingadb-web#376
This commit is contained in:
parent
8ac8271edd
commit
dcf394eaa6
|
@ -95,8 +95,6 @@
|
||||||
var _this = event.data.self;
|
var _this = event.data.self;
|
||||||
var $form = $(event.currentTarget).closest('form');
|
var $form = $(event.currentTarget).closest('form');
|
||||||
var $modal = $form.closest('#modal');
|
var $modal = $form.closest('#modal');
|
||||||
// otherwise the form is submitted several times by clicking the "Submit" button several times
|
|
||||||
$form.find('input:not(:disabled)').prop('disabled', true);
|
|
||||||
|
|
||||||
var req = _this.icinga.loader.submitForm($form, $autoSubmittedBy);
|
var req = _this.icinga.loader.submitForm($form, $autoSubmittedBy);
|
||||||
req.addToHistory = false;
|
req.addToHistory = false;
|
||||||
|
@ -107,6 +105,9 @@
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// otherwise the form is submitted several times by clicking the "Submit" button several times
|
||||||
|
$form.find('input:not(:disabled)').prop('disabled', true);
|
||||||
|
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue