Skip to content

Commit

Permalink
[IMP] website_form_require_legal: Set link to terms and conditions
Browse files Browse the repository at this point in the history
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
  • Loading branch information
pilarvargas-tecnativa committed Dec 13, 2023
1 parent 0a6dd94 commit a914de6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion website_form_require_legal/static/src/js/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
class="s_website_form_input form-check-input"
/>
<span class="form-check-label">
Agree to <a href="#">terms and conditions</a>
Agree to <a
t-attf-href="#{termsURL or '#'}"
>terms and conditions</a>
</span>
<div class="invalid-feedback">
You must agree before submitting.
Expand Down

0 comments on commit a914de6

Please sign in to comment.