summaryrefslogtreecommitdiff
path: root/addons/auth_signup/static
diff options
context:
space:
mode:
authorqsm-odoo <qsm@odoo.com>2019-02-06 14:55:18 +0000
committerqsm-odoo <qsm@odoo.com>2019-02-06 15:03:04 +0000
commit1a299e883368a8c5289cb80f5ec9b2e52b0b583e (patch)
tree179ac5d54058e8c8f2fc8a7974656b296bdddc22 /addons/auth_signup/static
parentfe03f7b6b89589c6417b82c582e7c98519858fc1 (diff)
[FIX] auth_signup: properly disable sign up button on click
The feature introduced with https://github.com/odoo/odoo/commit/67d1173bf381befc136d840e232514c2c9ef7e1b was broken by https://github.com/odoo/odoo/commit/b78b9c87c95acdf6fcf4f4eb3a80efa0e90eae09#diff-2d8ecbf95567bb339109e9552cbc68a3 because a class was removed by mistake. This commit does not reintroduce the class so that no view is modified in stable versions but rather review the JS to target the same button another way. Bug revealed while working on https://github.com/odoo/odoo/pull/29442 closes odoo/odoo#30896
Diffstat (limited to 'addons/auth_signup/static')
-rw-r--r--addons/auth_signup/static/src/js/signup.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/addons/auth_signup/static/src/js/signup.js b/addons/auth_signup/static/src/js/signup.js
index fc35d689d8a..0e97844c1fa 100644
--- a/addons/auth_signup/static/src/js/signup.js
+++ b/addons/auth_signup/static/src/js/signup.js
@@ -6,9 +6,11 @@ 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"/> ');
+ $('.oe_signup_form').on('submit', function (ev) {
+ var $form = $(ev.currentTarget);
+ var $btn = $form.find('.oe_login_buttons > button[type="submit"]');
+ $btn.attr('disabled', 'disabled');
+ $btn.prepend('<i class="fa fa-refresh fa-spin"/> ');
});
}
});