diff --git a/InvenTree/static/script/modal_form.js b/InvenTree/static/script/modal_form.js index e87af2467a..ea67abe4f7 100644 --- a/InvenTree/static/script/modal_form.js +++ b/InvenTree/static/script/modal_form.js @@ -125,6 +125,9 @@ function launchDeleteForm(modal, url, options = {}) { } }); + // Un-bind any attached click listeners + $(modal).off('click', '#modal-form-delete'); + $(modal).on('click', '#modal-form-delete', function() { var form = $(modal).find('#delete-form'); @@ -169,6 +172,9 @@ function handleModalForm(modal, url, options) { return false; }); + // Un-bind any attached click listeners + $(modal).off('click', '#modal-form-submit'); + $(modal).on('click', '#modal-form-submit', function() { $(modal).find('.js-modal-form').ajaxSubmit({ url: url,