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
MewenLeHo committed Oct 18, 2021
1 parent aa5ddac commit 5fab056
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions site/assets/js/tac.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@
var denyConsentButton = document.querySelector(".tarteaucitronDeny");
var checkboxes = document.querySelectorAll(".form-check-input");

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

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

0 comments on commit 5fab056

Please sign in to comment.