From a914de64fece9abe1f12a205f3d241d3c284b8f1 Mon Sep 17 00:00:00 2001 From: pilarvargas-tecnativa Date: Wed, 13 Dec 2023 17:57:33 +0100 Subject: [PATCH] [IMP] website_form_require_legal: Set link to terms and conditions Improve the template by allowing to set the URL when rendering the qweb template by setting a value for the termsURL variable by context. TT40305 --- website_form_require_legal/static/src/js/options.js | 2 +- .../static/src/xml/website_form_editor.xml | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/website_form_require_legal/static/src/js/options.js b/website_form_require_legal/static/src/js/options.js index 1b66d2902c..57c4c0b6b6 100644 --- a/website_form_require_legal/static/src/js/options.js +++ b/website_form_require_legal/static/src/js/options.js @@ -35,7 +35,7 @@ odoo.define("website_form_require_legal.form_editor", function (require) { $(template).html( qweb.render("website_form_require_legal.s_website_form_legal", { labelWidth: labelWidth, - termsURL: "terms", + termsURL: "/terms", }) ); const legal = template.content.firstElementChild; diff --git a/website_form_require_legal/static/src/xml/website_form_editor.xml b/website_form_require_legal/static/src/xml/website_form_editor.xml index 4771263cea..7c4662a58e 100644 --- a/website_form_require_legal/static/src/xml/website_form_editor.xml +++ b/website_form_require_legal/static/src/xml/website_form_editor.xml @@ -18,7 +18,9 @@ class="s_website_form_input form-check-input" /> - Agree to terms and conditions + Agree to terms and conditions
You must agree before submitting.