diff options
| author | qsm-odoo <qsm@odoo.com> | 2018-02-28 15:35:31 +0100 |
|---|---|---|
| committer | qsm-odoo <qsm@odoo.com> | 2018-02-28 17:09:17 +0100 |
| commit | b9d217c4f50a697e87c04cf85dbdad5896d538a5 (patch) | |
| tree | ccb999d47b3d065d8ee6bcbe6c42e23f2808ee18 /addons/website_form/static | |
| parent | dae9b1a10e62a340e6b97158d04e65181e98d426 (diff) | |
[FIX] website_form: button seemed buggy while it was actually disabled
Thank you to @Yajo
Closes https://github.com/odoo/odoo/pull/21628
Diffstat (limited to 'addons/website_form/static')
| -rw-r--r-- | addons/website_form/static/src/js/website_form.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/website_form/static/src/js/website_form.js b/addons/website_form/static/src/js/website_form.js index 7a8b413a04b..2f91db94c9b 100644 --- a/addons/website_form/static/src/js/website_form.js +++ b/addons/website_form/static/src/js/website_form.js @@ -47,7 +47,7 @@ odoo.define('website_form.animation', function (require) { send: function(e) { e.preventDefault(); // Prevent the default submit behavior - this.$target.find('.o_website_form_send').off(); // Prevent users from crazy clicking + this.$target.find('.o_website_form_send').off().addClass('disabled'); // Prevent users from crazy clicking var self = this; @@ -216,7 +216,7 @@ odoo.define('website_form.animation', function (require) { update_status: function(status) { var self = this; if (status != 'success') { // Restore send button behavior if result is an error - this.$target.find('.o_website_form_send').on('click',function(e) {self.send(e);}); + this.$target.find('.o_website_form_send').on('click',function(e) {self.send(e);}).removeClass('disabled'); } var $result = this.$('#o_website_form_result'); this.templates_loaded.done(function () { |
