Toggle navigation
Entrar
Registrar
BNMP2
Índice de Documentos
Diretório de Usuários
Application Index
Global
Diretório de Divisões
You need to login to start the chat system
Cookie Consent Setup
gdprMacros
Código fonte Wiki de
gdprMacros
Última modificação por
Administrator
em 08/09/2022, 17:23
Mostrar números de linha
{{velocity}} #macro(gdprHas $param) #set($gdprSettings = $util.decodeURI($xwiki.getUserPreferenceFromCookie("gdprSettings"))) #if("$!{gdprSettings}" != '') #if("$!{param}" != '') #set($gdprArray = $gdprSettings.split(',')) #if($param == 'preferences') $gdprArray.contains('preferences') #elseif($param == 'statistics') $gdprArray.contains('statistics') #elseif($param == 'marketing') $gdprArray.contains('marketing') #else {{info}}The parameter should be **preferences**, **statistics** or **marketing**.{{/info}} #end #else $gdprSettings #end #else {{info}}The current user has not yet accepted the cookie policy{{/info}} #end #end #macro(gdprSettings) #set($gdprSettings = $util.decodeURI($xwiki.getUserPreferenceFromCookie("gdprSettings"))) $gdprSettings #end #macro(insertScripts) #set($hasPreferences = "#gdprHas('preferences')") #set($hasStatistics = "#gdprHas('statistics')") #set($hasMarketing = "#gdprHas('marketing')") #set($cookieSetupDoc = $xwiki.getDocument('CookieConsent.WebHome')) #set($setupObject = $cookieSetupDoc.getObject('CookieConsent.ConfigurationClass', 'lang', $xcontext.locale)) #set($preferencesScripts = $setupObject.getProperty('preferencesScripts').value) #set($statisticsScripts = $setupObject.getProperty('statisticsScripts').value) #set($marketingScripts = $setupObject.getProperty('marketingScripts').value) {{html clean="false"}} #if("$!{hasPreferences.trim()}" == 'true') $!preferencesScripts #end #if("$!{hasStatistics.trim()}" == 'true') $!statisticsScripts #end #if("$!{hasMarketing.trim()}" == 'true') $!marketingScripts #end {{/html}} #end {{/velocity}}