summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenoit Socias <bso@odoo.com>2020-12-02 07:26:49 +0000
committerBenoit Socias <bso@odoo.com>2020-12-02 07:26:49 +0000
commit82b06dc4c3df502c8e006169f4ee0f6aa33e3ac1 (patch)
tree4878fe46f40652ded2f1705833f2e4692376e43d
parentabf1982d4ec09b5e87c1d7573158257f91961214 (diff)
[FIX] website_mass_mailing: use the correct action to obtain token
Before this commit the "subscribe to newsletter" form was using the action of the website form to obtain its reCaptcha token, while the validation of the token was done on a specific subscribe action. After this commit the "subscribe to newsletter" form is using its own action that matches the one used for validation. Fixes https://github.com/odoo/odoo/issues/62504 closes odoo/odoo#62713 Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
-rw-r--r--addons/website_mass_mailing/static/src/js/website_mass_mailing.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/website_mass_mailing/static/src/js/website_mass_mailing.js b/addons/website_mass_mailing/static/src/js/website_mass_mailing.js
index e941f5d8763..b453090fba0 100644
--- a/addons/website_mass_mailing/static/src/js/website_mass_mailing.js
+++ b/addons/website_mass_mailing/static/src/js/website_mass_mailing.js
@@ -79,7 +79,7 @@ publicWidget.registry.subscribe = publicWidget.Widget.extend({
return false;
}
this.$target.removeClass('o_has_error').find('.form-control').removeClass('is-invalid');
- const tokenObj = await this._recaptcha.getToken('website_form');
+ const tokenObj = await this._recaptcha.getToken('website_mass_mailing_subscribe');
if (tokenObj.error) {
self.displayNotification({
type: 'danger',