summaryrefslogtreecommitdiffstats
path: root/web_src
diff options
context:
space:
mode:
Diffstat (limited to 'web_src')
-rw-r--r--web_src/js/features/common-global.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/web_src/js/features/common-global.js b/web_src/js/features/common-global.js
index dda803ae8d..eb21a4bb93 100644
--- a/web_src/js/features/common-global.js
+++ b/web_src/js/features/common-global.js
@@ -142,6 +142,18 @@ export function initGlobalCommon() {
window.location = href;
}
});
+
+ // loading-button this logic used to prevent push one form more than one time
+ $(document).on('click', '.button.loading-button', function (e) {
+ const $btn = $(this);
+
+ if ($btn.hasClass('loading')) {
+ e.preventDefault();
+ return false;
+ }
+
+ $btn.addClass('loading disabled');
+ });
}
export function initGlobalDropzone() {