Add only required cookies option

This commit is contained in:
2025-04-07 23:58:40 +02:00
parent 5172966eb2
commit 2cab569707
4 changed files with 71 additions and 33 deletions

View File

@ -27,21 +27,23 @@
<label for="gdpr-cookie-necessary">{l s='Necessary' mod='gdprcookieconsent'}</label>
<p>{l s='Necessary cookies help make a website usable by enabling basic functions like page navigation. The website cannot function properly without these cookies.' mod='gdprcookieconsent'}</p>
</div>
<div class="gdpr-cookie-category">
<input type="checkbox" id="gdpr-cookie-functional" class="gdpr-cookie-checkbox" data-cookie-category="functional">
<label for="gdpr-cookie-functional">{l s='Functional' mod='gdprcookieconsent'}</label>
<p>{l s='Functional cookies enable a website to remember information that changes the way the website behaves or looks, like your preferred language or the region you are in.' mod='gdprcookieconsent'}</p>
</div>
<div class="gdpr-cookie-category">
<input type="checkbox" id="gdpr-cookie-analytics" class="gdpr-cookie-checkbox" data-cookie-category="analytics">
<label for="gdpr-cookie-analytics">{l s='Analytics' mod='gdprcookieconsent'}</label>
<p>{l s='Analytics cookies help website owners understand how visitors interact with websites by collecting and reporting information anonymously.' mod='gdprcookieconsent'}</p>
</div>
<div class="gdpr-cookie-category">
<input type="checkbox" id="gdpr-cookie-marketing" class="gdpr-cookie-checkbox" data-cookie-category="marketing">
<label for="gdpr-cookie-marketing">{l s='Marketing' mod='gdprcookieconsent'}</label>
<p>{l s='Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user.' mod='gdprcookieconsent'}</p>
</div>
{if !$gdprCookieOnlyRequired}
<div class="gdpr-cookie-category">
<input type="checkbox" id="gdpr-cookie-functional" class="gdpr-cookie-checkbox" data-cookie-category="functional">
<label for="gdpr-cookie-functional">{l s='Functional' mod='gdprcookieconsent'}</label>
<p>{l s='Functional cookies enable a website to remember information that changes the way the website behaves or looks, like your preferred language or the region you are in.' mod='gdprcookieconsent'}</p>
</div>
<div class="gdpr-cookie-category">
<input type="checkbox" id="gdpr-cookie-analytics" class="gdpr-cookie-checkbox" data-cookie-category="analytics">
<label for="gdpr-cookie-analytics">{l s='Analytics' mod='gdprcookieconsent'}</label>
<p>{l s='Analytics cookies help website owners understand how visitors interact with websites by collecting and reporting information anonymously.' mod='gdprcookieconsent'}</p>
</div>
<div class="gdpr-cookie-category">
<input type="checkbox" id="gdpr-cookie-marketing" class="gdpr-cookie-checkbox" data-cookie-category="marketing">
<label for="gdpr-cookie-marketing">{l s='Marketing' mod='gdprcookieconsent'}</label>
<p>{l s='Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user.' mod='gdprcookieconsent'}</p>
</div>
{/if}
</div>
</div>
<div class="gdpr-cookie-modal-footer">
@ -58,13 +60,15 @@
<div id="gdpr-cookie-banner" class="gdpr-cookie-banner">
<div class="gdpr-cookie-banner-content">
<p>{$gdprCookieMessage}</p>
<div class="gdpr-cookie-banner-info">
<p><small><strong>{l s='Data Controller:' mod='gdprcookieconsent'}</strong> {$gdprCookieDataController} |
<strong>{l s='Retention:' mod='gdprcookieconsent'}</strong> {$gdprCookieRetentionPeriod}</small></p>
</div>
{* <div class="gdpr-cookie-banner-info">*}
{* <p><small><strong>{l s='Data Controller:' mod='gdprcookieconsent'}</strong> {$gdprCookieDataController} | *}
{* <strong>{l s='Retention:' mod='gdprcookieconsent'}</strong> {$gdprCookieRetentionPeriod}</small></p>*}
{* </div>*}
<div class="gdpr-cookie-banner-buttons">
<button id="gdpr-cookie-banner-decline" class="gdpr-cookie-banner-decline">{$gdprCookieDecline}</button>
<button id="gdpr-cookie-banner-settings" class="gdpr-cookie-banner-settings">{$gdprCookieSettings}</button>
{if !$gdprCookieOnlyRequired}
<button id="gdpr-cookie-banner-decline" class="gdpr-cookie-banner-decline">{$gdprCookieDecline}</button>
<button id="gdpr-cookie-banner-settings" class="gdpr-cookie-banner-settings">{$gdprCookieSettings}</button>
{/if}
<button id="gdpr-cookie-banner-accept" class="gdpr-cookie-banner-accept">{$gdprCookieAccept}</button>
</div>
</div>