diff --git a/public/js/icinga/behavior/modal.js b/public/js/icinga/behavior/modal.js index 3f734c4af..68f895561 100644 --- a/public/js/icinga/behavior/modal.js +++ b/public/js/icinga/behavior/modal.js @@ -95,8 +95,6 @@ var _this = event.data.self; var $form = $(event.currentTarget).closest('form'); 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); 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.preventDefault(); return false;