[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#62728 X-original-commit: 82b06dc4c3df502c8e006169f4ee0f6aa33e3ac1 Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user