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 20, 2021
1 parent ed344f5 commit 03e3b7f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion site/assets/js/tac.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
'#googletagmanagerLine .tarteaucitronAsk'
)
var choiceEvent =
'tarteaucitron.userInterface.respond(document.getElementById("googletagmanagerAllowed"),document.getElementById("googletagmanagerAllowed").checked);'
'tarteaucitron.userInterface.respond(document.getElementById(\'googletagmanagerAllowed\'),document.getElementById(\'googletagmanagerAllowed\').checked);'
var toggle = document
.createRange()
.createContextualFragment(
Expand All @@ -61,7 +61,13 @@
)
ask.innerHTML = ''
ask.append(toggle)
},
{ once: true }
)

window.addEventListener(
'tac.open_panel',
function () {
var allowConsentButton = document.querySelector('#tarteaucitronAllAllowed')
var denyConsentButton = document.querySelector('#tarteaucitronAllDenied')
var checkboxes = document.querySelectorAll('.form-check-input')
Expand All @@ -83,6 +89,7 @@
},
{ once: true }
)

})()

if (typeof tarteaucitron !== 'undefined') {
Expand Down

0 comments on commit 03e3b7f

Please sign in to comment.