* = base_setup, website_form, website_sale, website_crm, crm_iap_lead_website, website_hr_recruitment, website_mass_mailing Integrate reCaptchaV3 on website_form submit and website_mass_mailing subscription. You can now use ReCaptchaV3 to add reCaptcha verification in any module using google_recaptcha. Also added a better error management on the form with custom messages. task-2217980 closes odoo/odoo#48466 Related: odoo/enterprise#9649 Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
18 lines
750 B
XML
18 lines
750 B
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
|
|
<template id="assets_frontend" inherit_id="web.assets_frontend">
|
|
<xpath expr="//link[last()]" position="after">
|
|
<link rel="stylesheet" type="text/scss" href="/google_recaptcha/static/src/scss/recaptcha.scss"/>
|
|
</xpath>
|
|
<xpath expr="//script[last()]" position="after">
|
|
<t t-set="recaptcha_public_key" t-value="request.env['ir.config_parameter'].sudo().get_param('recaptcha_public_key')"/>
|
|
<script t-if="recaptcha_public_key" type="text/javascript">
|
|
odoo.reCaptchaPublicKey = '<t t-raw="recaptcha_public_key"/>';
|
|
</script>
|
|
<script type="text/javascript" src="/google_recaptcha/static/src/js/recaptcha.js"/>
|
|
</xpath>
|
|
</template>
|
|
|
|
</odoo>
|