{% if constant("TARTEAUCITRON_ACTIVE") %}
<script type="text/javascript">
{% if constant("LANGUE") == "fr" %}
window.tarteaucitronForceLanguage = "fr";
{% set tarteaucitronlangue="FR" %}
{% else %}
window.tarteaucitronForceLanguage = "en";
{% set tarteaucitronlangue="EN" %}
{% endif %}
{% if constant("COOKIE_BOUTON_REFUSER") is defined and constant("COOKIE_BOUTON_REFUSER") is not empty and constant("COOKIE_BOUTON_REFUSER") == "discret" and constant("COOKIE_TYPE") is not empty %}
{% set alertBigPrivacy_part1=("<a class=\"btnDenyAll\" onclick=\"tarteaucitron.userInterface.respondAll(false, '', true);return false;\" href=\"#\">"~lg_cookie_popup_refuser_discret~"</a>") %}
{% else %}
{% set alertBigPrivacy_part1="" %}
{% endif %}
{% if constant("COOKIE_TYPE") is not empty and constant("COOKIE_TYPE") in ["top","middle","popup"] %}
{% if constant("COOKIE_POPUP_MESSAGE_"~tarteaucitronlangue) %}
{% set alertBigPrivacy_part2 = constant("COOKIE_POPUP_MESSAGE_"~tarteaucitronlangue)|e('js')|nl2br %}
{% else %}
{% set alertBigPrivacy_part2="" %}
{% endif %}
{% else %}
{% if constant("COOKIE_BAR_MESSAGE_"~tarteaucitronlangue) %}
{% set alertBigPrivacy_part2 = constant("COOKIE_BAR_MESSAGE_"~tarteaucitronlangue)|e('js')|nl2br %}
{% else %}
{% set alertBigPrivacy_part2="" %}
{% endif %}
{% endif %}
{% if constant("COOKIE_MODAL_PARAM_MESSAGE_"~tarteaucitronlangue) %}
{% set tac_disclaimer=constant("COOKIE_MODAL_PARAM_MESSAGE_"~tarteaucitronlangue)|e('js')|nl2br %}
{% else %}
{% set tac_disclaimer="" %}
{% endif %}
var tarteaucitronCustomText = {
"middleBarHead": "",
"alertBigPrivacy": "{{ alertBigPrivacy_part1 }} {{ alertBigPrivacy_part2 }}",
"disclaimer": "{{ tac_disclaimer }}",
"fallback": "{{ lg_cookie_fallback }}"
{% if constant("TARTEAUCITRON_SERVICES") is defined %}
{% for key,value in constant("TARTEAUCITRON_SERVICES") %}
{% if value == true and constant('lg_cookie_engage_'~ key) is defined %}
,"engage-{{ key }}": "{{ constant('lg_cookie_engage_'~ key) }}"
{% endif %}
{% endfor %}
{% endif %}
};
tarteaucitron.events = {
"load": function () {
var $cookiebar = document.getElementById('tarteaucitronAlertBig');
if ($cookiebar.style.display == "block") {
let cookiebar_height = $cookiebar.offsetHeight;
if (cookiebar_height > 0) {
document.getElementById('foot_copyrights').style.marginBottom = (cookiebar_height) + 'px';
}
}
}
};
tarteaucitron.init({
"privacyUrl": "", /* Privacy policy url */
"hashtag": "#tarteaucitron", /* Open the panel with this hashtag */
"cookieName": "tarteaucitron", /* Cookie name */
"orientation": "{% if constant("COOKIE_TYPE") is defined and constant("COOKIE_TYPE") in ["top","middle","bottom","popup"] %}{{ constant("COOKIE_TYPE") }}{% else %}bottom{% endif %}", /* Banner position (top - bottom - middle - popup) */
"bodyPosition": "bottom",
"groupServices": false, /* Group services by category */
"showAlertSmall": false, /* Show the small banner on bottom right */
"cookieslist": false, /* Show the cookie list */
"showIcon": false, /* Show cookie icon to manage cookies */
"adblocker": false, /* Show a Warning if an adblocker is detected */
"DenyAllCta": {% if constant("COOKIE_BOUTON_REFUSER") is defined and constant("COOKIE_BOUTON_REFUSER") == "discret" and constant("COOKIE_TYPE") is defined and constant("COOKIE_TYPE") in ["top","middle","bottom","popup"] %}false{% elseif constant("COOKIE_BOUTON_REFUSER") is defined and constant("COOKIE_BOUTON_REFUSER") in ["true","false"] %}{{ constant("COOKIE_BOUTON_REFUSER") }}{% else %}true{% endif %}, /* Show the deny all button */
"AcceptAllCta": true, /* Show the accept all button when highPrivacy on */
"highPrivacy": true, /* Disable auto consent */
"handleBrowserDNTRequest": false, /* If Do Not Track == 1, disallow all */
"removeCredit": true, /* Remove credit link */
"moreInfoLink": true, /* Show more info link */
"useExternalCss": false, /* If false, the tarteaucitron.css file will be loaded */
//"cookieDomain": ".my-multisite-domaine.fr", /* Shared cookie for multisite */
"readmoreLink": "", /* Change the default readmore link */
"mandatory": true /* Show a message about mandatory cookies */
});
</script>
{% endif %}