summaryrefslogtreecommitdiff
path: root/addons/auth_signup/static/src
diff options
context:
space:
mode:
authorSanjay Jamod <sja@odoo.com>2017-09-11 16:22:16 +0530
committerYannick Tivisse <yti@odoo.com>2017-09-26 11:02:26 +0200
commit67d1173bf381befc136d840e232514c2c9ef7e1b (patch)
tree7b95e03a16c355c78681327cffed4a0a71a1229c /addons/auth_signup/static/src
parent25a0b0f4db34d9dd17879e6044806903d4ade76b (diff)
[IMP] auth_signup: Disable 'Sign Up' button to prevent user from continuous clicking
Diffstat (limited to 'addons/auth_signup/static/src')
-rw-r--r--addons/auth_signup/static/src/js/signup.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/addons/auth_signup/static/src/js/signup.js b/addons/auth_signup/static/src/js/signup.js
new file mode 100644
index 00000000000..fc35d689d8a
--- /dev/null
+++ b/addons/auth_signup/static/src/js/signup.js
@@ -0,0 +1,16 @@
+odoo.define('auth_signup.signup', function (require) {
+ 'use strict';
+
+var base = require('web_editor.base');
+
+base.ready().then(function() {
+ // Disable 'Sign Up' button to prevent user form continuous clicking
+ if ($('.oe_signup_form').length > 0) {
+ $('.oe_signup_form').on('submit', function () {
+ $('.o_signup_btn').attr('disabled', 'disabled');
+ $('.o_signup_btn').prepend('<i class="fa fa-refresh fa-spin"/> ');
+ });
+ }
+});
+
+});