summaryrefslogtreecommitdiff
path: root/assets/js/components/submit-buttons.js
diff options
context:
space:
mode:
Diffstat (limited to 'assets/js/components/submit-buttons.js')
-rw-r--r--assets/js/components/submit-buttons.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/assets/js/components/submit-buttons.js b/assets/js/components/submit-buttons.js
index 24d46855..2745841a 100644
--- a/assets/js/components/submit-buttons.js
+++ b/assets/js/components/submit-buttons.js
@@ -78,6 +78,14 @@ KB.component('submit-buttons', function (containerElement, options) {
KB.on('modal.hide', onHide);
KB.on('modal.submit.label', onUpdateSubmitLabel);
+ KB.on('modal.close', function () {
+ KB.removeListener('modal.stop', onStop);
+ KB.removeListener('modal.disable', onDisable);
+ KB.removeListener('modal.enable', onEnable);
+ KB.removeListener('modal.hide', onHide);
+ KB.removeListener('modal.submit.label', onUpdateSubmitLabel);
+ });
+
var formActionElementBuilder = KB.dom('div')
.attr('class', 'form-actions')
.add(buildButton());