Pb cookie footer en mode trad

libellé confidentialité devient cookie
This commit is contained in:
Fred Tempez 2021-11-30 19:14:06 +01:00
parent ac370dd89f
commit 23c03ed46d
5 changed files with 10 additions and 34 deletions

View File

@ -240,30 +240,6 @@ core.start = function() {
document.cookie = "ZWII_COOKIE_CONSENT=<?php echo $_SERVER['PHP_SELF']; ?>;" + domain + ";" + path + ";" + samesite + ";" + expires;
});
/**
* Suppression du cookie de consentement
$('#cookieConsentRefused').on('click', function() {
var samesite = "samesite=lax";
var getUrl = window.location;
var domain = "domain=" + getUrl.host;
var path = "path=" + getUrl.pathname.split('/')[1];
var samesite = "samesite=lax";
var e = new Date();
e.setFullYear(e.getFullYear() - 1);
var expires = "expires=" + e.toUTCString();
document.cookie = "ZWII_COOKIE_CONSENT=false;" + domain + ";" + path + ";" + samesite + ";" + expires;
// Désactiver le cookie GA
document.cookie = "ZWII_COOKIE_GA_CONSENT=false;" + domain + ";" + path + ";" + samesite + ";" + expires;
// fermer la fenêtre
$("#cookieConsent").fadeOut();
});
*/
/**
* Fermeture de la popup des cookies

View File

@ -1483,7 +1483,7 @@ class common {
$items .= $this->getData(['theme','footer','displaySearch']) === false ? ' class="displayNone" >' : '>';
$label = empty($this->getData(['locale','searchPageLabel'])) ? 'Rechercher' : $this->getData(['locale','searchPageLabel']);
if ($this->getData(['locale','searchPageId']) !== 'none') {
$items .= '<wbr>&nbsp;|&nbsp;<a href="' . helper::baseUrl() . $this->getData(['locale','searchPageId']) . '" data-tippy-content="' . $label . '" >' . $label .'</a>';
$items .= '<wbr>&nbsp;|&nbsp;<a href="' . helper::baseUrl() . $this->getData(['locale','searchPageId']) . '" data-tippy-content="Rechercher dans le site >' . $label .'</a>';
}
$items .= '</span>';
// Affichage des mentions légales
@ -1491,14 +1491,14 @@ class common {
$items .= $this->getData(['theme','footer','displayLegal']) === false ? ' class="displayNone" >' : '>';
$label = empty($this->getData(['locale','legalPageLabel'])) ? 'Mentions Légales' : $this->getData(['locale','legalPageLabel']);
if ($this->getData(['locale','legalPageId']) !== 'none') {
$items .= '<wbr>&nbsp;|&nbsp;<a href="' . helper::baseUrl() . $this->getData(['locale','legalPageId']) . '" data-tippy-content="' . $label . '">' . $label .'</a>';
$items .= '<wbr>&nbsp;|&nbsp;<a href="' . helper::baseUrl() . $this->getData(['locale','legalPageId']) . '" data-tippy-content="Page des mentions légales" >' . $label .'</a>';
}
$items .= '</span>';
// Affichage de la gestion des cookies
$items .= '<span id="footerDisplayCookie"';
$items .= ($this->getData(['config', 'cookieConsent']) === true && $this->getData(['theme', 'footer', 'displayCookie']) === true) ? '' : ' class="displayNone" >';
$label = empty($this->getData(['locale', 'cookies', 'cookiesFooterText'])) ? 'Confidentialité' : $this->getData(['locale', 'cookies', 'cookiesFooterText']) ;
$items .= '<wbr>&nbsp;|&nbsp;<a href="javascript:void(0)" id="footerLinkCookie">'. $label .'</a>';
$items .= ($this->getData(['config', 'cookieConsent']) === true && $this->getData(['theme', 'footer', 'displayCookie']) === true) ? '>' : ' class="displayNone" >';
$label = empty($this->getData(['locale', 'cookies', 'cookiesFooterText'])) ? 'Cookies' : $this->getData(['locale', 'cookies', 'cookiesFooterText']) ;
$items .= '<wbr>&nbsp;|&nbsp;<a href="javascript:void(0)" id="footerLinkCookie" data-tippy-content="Message d\'information relatif aux cookies">'. $label .'</a>';
$items .= '</span>';
// Affichage du lien de connexion
if(

View File

@ -148,9 +148,9 @@
</div>
<div class="col6">
<?php echo template::text('localeCookiesFooterText', [
'label' => 'Confidentialité des cookies',
'label' => 'Cookies',
'value' => $this->getData(['locale', 'cookies', 'cookiesFooterText']),
'placeHolder' => 'Confidentialité'
'placeHolder' => 'Cookies'
]); ?>
</div>
</div>

View File

@ -80,7 +80,7 @@ class init extends common {
'cookiesTitleText' => 'Gérer les cookies',
'cookiesLinkMlText' => 'Consulter les mentions légales',
'cookiesCheckboxGaText' => 'Autorisation des cookies Google Analytics',
'cookiesFooterText' => 'Confidentialité',
'cookiesFooterText' => 'Cookies',
'cookiesButtonText' => 'J\'ai compris'
]
],

View File

@ -89,9 +89,9 @@
]); ?>
</div>
<div class="col3">
<?php echo template::checkbox('themefooterDisplayCookie', true, 'Confidentialité', [
<?php echo template::checkbox('themefooterDisplayCookie', true, 'Cookies', [
'checked' => $this->getData(['config', 'cookieConsent']) === true ? $this->getData(['theme', 'footer', 'displayCookie']) : false,
'help' => 'Affiche le message relatif au cookie, disponible si le message d\'acceptation des cookies est activé.',
'help' => 'Message d\'information relatif aux cookies, disponible si l\'acceptation des cookies est activé.',
'disabled' => !$this->getData(['config', 'cookieConsent'])
]); ?>
</div>