summaryrefslogtreecommitdiff
path: root/addons/website_form/static/src/xml
diff options
context:
space:
mode:
authorfja-odoo <fja@odoo.com>2020-04-24 10:50:28 +0000
committerfja-odoo <fja@odoo.com>2020-06-05 10:58:50 +0000
commit541148613451f4c14a299672d91c4397d8a9f6de (patch)
treec798cd359c3960d4ae86ebc9847666a3a30bf4a6 /addons/website_form/static/src/xml
parentfea1706f275e88a0d28dd2776c6aa0dd62c1bf3d (diff)
[IMP] google_recaptcha, *: integrate recaptchaV3
* = 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>
Diffstat (limited to 'addons/website_form/static/src/xml')
-rw-r--r--addons/website_form/static/src/xml/website_form.xml10
-rw-r--r--addons/website_form/static/src/xml/website_form_editor.xml9
2 files changed, 11 insertions, 8 deletions
diff --git a/addons/website_form/static/src/xml/website_form.xml b/addons/website_form/static/src/xml/website_form.xml
index 5403f763e24..9c1390c74df 100644
--- a/addons/website_form/static/src/xml/website_form.xml
+++ b/addons/website_form/static/src/xml/website_form.xml
@@ -8,17 +8,11 @@
</span>
</t>
- <!-- Missing field status -->
- <t t-name="website_form.status_invalid">
- <span id="s_website_form_result" class="text-danger ml8">
- <i class="fa fa-close mr4" role="img" aria-label="Error" title="Error"/>Please fill in the form correctly.
- </span>
- </t>
-
<!-- Error status -->
<t t-name="website_form.status_error">
<span id="s_website_form_result" class="text-danger ml8">
- <i class="fa fa-close mr4" role="img" aria-label="Error" title="Error"/>An error has occured, the form has not been sent.
+ <i class="fa fa-close mr4" role="img" aria-label="Error" title="Error"/>
+ <t t-esc="message"/>
</span>
</t>
</templates>
diff --git a/addons/website_form/static/src/xml/website_form_editor.xml b/addons/website_form/static/src/xml/website_form_editor.xml
index 6db59f01a22..13d4ae1aeb5 100644
--- a/addons/website_form/static/src/xml/website_form_editor.xml
+++ b/addons/website_form/static/src/xml/website_form_editor.xml
@@ -21,6 +21,15 @@
</div>
</t>
+ <t t-name="webite_form.s_website_form_recaptcha_legal">
+ <div class="col-12 s_website_form_recaptcha" data-name="Recaptcha Legal">
+ <div t-attf-style="width: #{labelWidth or '200px'}" class="s_website_form_label"/>
+ <div class="col-sm">
+ <t t-call="google_recaptcha.recaptcha_legal_terms"/>
+ </div>
+ </div>
+ </t>
+
<!-- Generic Field Layout -->
<!-- Changes made here needs to be reflected in the different Form view (Contact Us, Jobs, ...) -->
<t t-name="website_form.field">