Skip to content

Commit

Permalink
fix(#831): checkboxes display when user accept or deny cookies
Browse files Browse the repository at this point in the history
  • Loading branch information
LE HO Mewen authored and MewenLeHo committed Oct 28, 2021
1 parent f4ae90c commit 8b4a713
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions site/assets/js/tac.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,13 @@
ask.innerHTML = "";
ask.append(toggle);

let allowConsentButton = document.querySelector(".tarteaucitronAllow");
let denyConsentButton = document.querySelector(".tarteaucitronDeny");
let checkboxes = document.querySelectorAll(".form-check-input");
var allowConsentButton = document.querySelector(".tarteaucitronAllow");
var denyConsentButton = document.querySelector(".tarteaucitronDeny");
var checkboxes = document.querySelectorAll(".form-check-input");

[allowConsentButton].forEach((button) => {
button.addEventListener("click", () => {
for (let i = 0; i < checkboxes.length; i++) {
for (var i = 0; i < checkboxes.length; i++) {
if (!checkboxes.checked) {
checkboxes[i].checked = true;
}
Expand All @@ -78,7 +78,7 @@

[denyConsentButton].forEach((button) => {
button.addEventListener("click", () => {
for (let i = 0; i < checkboxes.length; i++) {
for (var i = 0; i < checkboxes.length; i++) {
if (checkboxes.checked !== true) {
checkboxes[i].checked = false;
}
Expand Down

0 comments on commit 8b4a713

Please sign in to comment.