Skip to content
Snippets Groups Projects
Commit 77566f50 authored by Goffin Simon's avatar Goffin Simon
Browse files

[FIX] website_sale: Pay Now button is clickable even without clicking policies and conditions

Steps to reproduce the bug:

-Go to the shop
-Add an item to card
-Checkout
-Insert address info
-Click proceed
-Enable "Accept Terms & Conditions"
-With the HTML Editor, remove the attribute checked="checked" in template Accept Terms & Conditions

Bug:

-Pay Now button is clickable but the Policy and Procedures box was not checked.

opw:771418
parent 3d2a7a0d
No related branches found
No related tags found
No related merge requests found
......@@ -6,9 +6,10 @@ var ajax = require('web.ajax');
$(document).ready(function () {
// If option is enable
if ($("#checkbox_cgv").length) {
$("#checkbox_cgv").click(function() {
var enabling_button = function() {
$("div.oe_sale_acquirer_button").find('input, button').prop("disabled", !this.checked);
});
};
$("#checkbox_cgv").click(enabling_button).each(enabling_button);
}
// When choosing an acquirer, display its Pay Now button
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment