Create cookie consent "all" when accept all cookies Set cookie duration to 365 days based on the AEPD's cookie usage guidelines. Note from the document: "Cookies with a duration of up to 24 months are considered acceptable as long as they are periodically updated." Reference: https://www.aepd.es/guias/guia-cookies.pdf
21 lines
584 B
JavaScript
21 lines
584 B
JavaScript
(function() {
|
|
"use strict";
|
|
App.CookiesConsent = {
|
|
hide: function() {
|
|
$("#cookies_consent_banner").hide();
|
|
$("#cookies_consent_management").foundation("close");
|
|
},
|
|
initialize: function() {
|
|
$(".accept-all-cookies").on("click", function() {
|
|
App.Cookies.saveCookie("cookies_consent", "all", 365);
|
|
App.CookiesConsent.hide();
|
|
});
|
|
|
|
$(".accept-essential-cookies").on("click", function() {
|
|
App.Cookies.saveCookie("cookies_consent", "essential", 365);
|
|
App.CookiesConsent.hide();
|
|
});
|
|
}
|
|
};
|
|
}).call(this);
|