Customer Privacy¶
The customer_privacy
module is used to render a modal with a prompt asking for the consent of saving privacy information.
Configuration parameters¶
none
Module source code¶
{% from "@macros/icon.twig" import icon %}
{% set settings = ObjectApi.getConsentsSettings() %}
{% if settings.isCookieInformationEnabled %}
<consents-modal modal-label="{{ settings.cookiesPolicyHeader }}" hidden>
<header slot="base-header">
<strong class="p p_l font_semibold">{{ settings.headingHeader }}</strong>
</header>
<div slot="base-content">
<div class="p p_s color_secondary">
{{ settings.headingContent|raw }}
{% if settings.hasPrivacyPolicy %}
<p>
<a class="link link_secondary" href="{{ settings.privacyPolicyLink }}">{{ settings.privacyPolicyLinkDescription }}</a>
</p>
{% endif %}
</div>
</div>
<consents-accept-necessary slot="base-buttons" class="btn btn_outline">{{ translate('Allow only necessary') }}</consents-accept-necessary>
<consents-show-advanced slot="base-buttons" class="btn btn_outline">{{ translate('Customize consents') }}</consents-show-advanced>
<consents-accept-all slot="base-buttons" class="btn btn_primary">{{ translate('Allow all') }}</consents-accept-all>
<header slot="advanced-header">
<strong class="p p_l font_semibold">{{ settings.cookiesPolicyHeader }}</strong>
</header>
<consents-show-base slot="advanced-header" class="btn btn_icon">
{{ icon('icon-x', {
size: 'l',
classNames: ['btn__icon']
}) }}
</consents-show-base>
<div slot="advanced-content">
<div class="mb-xs-2 color_secondary">
{{ settings.cookiesPolicyDescription|raw }}
</div>
<div class="control">
<consents-checkbox label="{{ translate('Select all') }}" name="all"></consents-checkbox>
</div>
<div class="control">
<consents-checkbox class="mb-xs-2" label="{{ translate('Necessary for the website to function') }}" checked disabled>
<div slot>{{ settings.necessaryCookiesDescription|raw }}</div>
</consents-checkbox>
</div>
<div class="control">
<consents-checkbox class="mb-xs-2" label="{{ translate('Functional') }}" name="functionalConsent">
<div slot>{{ settings.functionalCookiesDescription|raw }}</div>
</consents-checkbox>
</div>
<div class="control">
<consents-checkbox class="mb-xs-2" label="{{ translate('Analytical') }}" name="analyticsConsent">
<div slot>{{ settings.analyticalCookiesDescription|raw }}</div>
</consents-checkbox>
</div>
<div class="control">
<consents-checkbox class="mb-xs-2" label="{{ translate('Analytical software provider') }}" name="platformAnalyticsConsent">
<div slot>{{ settings.platformCookiesDescription|raw }}</div>
</consents-checkbox>
</div>
<div class="control">
<consents-checkbox class="mb-xs-2" label="{{ translate('Marketing') }}" name="marketingConsent">
<div slot>{{ settings.marketingCookiesDescription|raw }}</div>
</consents-checkbox>
</div>
</div>
<consents-show-base slot="advanced-buttons" class="btn btn_outline">{{ translate('Cancel') }}</consents-show-base>
<consents-save slot="advanced-buttons" class="btn btn_primary">{{ translate('Save preferences') }}</consents-save>
</consents-modal>
{% endif %}
Webcomponents reference¶
- consents-modal
- consents-show-advanced
- consents-accept-all
- consents-show-base
- consents-checkbox
- consents-save