Several adjustments
- Add settings button
This commit is contained in:
parent
2cab569707
commit
16113d2639
@ -48,7 +48,7 @@ class GdprCookieConsent extends Module
|
|||||||
Configuration::updateValue('GDPR_COOKIE_DECLINE', 'Decline Non-Essential') &&
|
Configuration::updateValue('GDPR_COOKIE_DECLINE', 'Decline Non-Essential') &&
|
||||||
Configuration::updateValue('GDPR_COOKIE_SETTINGS', 'Cookie Settings') &&
|
Configuration::updateValue('GDPR_COOKIE_SETTINGS', 'Cookie Settings') &&
|
||||||
Configuration::updateValue('GDPR_COOKIE_MORE_INFO', 'More Information') &&
|
Configuration::updateValue('GDPR_COOKIE_MORE_INFO', 'More Information') &&
|
||||||
Configuration::updateValue('GDPR_COOKIE_MORE_INFO_URL', 'content/2-privacy-policy') &&
|
Configuration::updateValue('GDPR_COOKIE_MORE_INFO_URL', 'https://yourstore.net/content/privacy-policy') &&
|
||||||
Configuration::updateValue('GDPR_COOKIE_DATA_CONTROLLER', 'Your Company Name') &&
|
Configuration::updateValue('GDPR_COOKIE_DATA_CONTROLLER', 'Your Company Name') &&
|
||||||
Configuration::updateValue('GDPR_COOKIE_RETENTION_PERIOD', '365 days') &&
|
Configuration::updateValue('GDPR_COOKIE_RETENTION_PERIOD', '365 days') &&
|
||||||
Configuration::updateValue('GDPR_COOKIE_THIRD_PARTIES', 'Google Analytics, Facebook, etc.') &&
|
Configuration::updateValue('GDPR_COOKIE_THIRD_PARTIES', 'Google Analytics, Facebook, etc.') &&
|
||||||
@ -303,9 +303,7 @@ class GdprCookieConsent extends Module
|
|||||||
'gdprCookieDecline' => Configuration::get('GDPR_COOKIE_DECLINE'),
|
'gdprCookieDecline' => Configuration::get('GDPR_COOKIE_DECLINE'),
|
||||||
'gdprCookieSettings' => Configuration::get('GDPR_COOKIE_SETTINGS'),
|
'gdprCookieSettings' => Configuration::get('GDPR_COOKIE_SETTINGS'),
|
||||||
'gdprCookieMoreInfo' => Configuration::get('GDPR_COOKIE_MORE_INFO'),
|
'gdprCookieMoreInfo' => Configuration::get('GDPR_COOKIE_MORE_INFO'),
|
||||||
'gdprCookieMoreInfoUrl' => $this->context->link->getCMSLink(
|
'gdprCookieMoreInfoUrl' => Configuration::get('GDPR_COOKIE_MORE_INFO_URL'),
|
||||||
Configuration::get('GDPR_COOKIE_MORE_INFO_URL')
|
|
||||||
),
|
|
||||||
'gdprCookieDataController' => Configuration::get('GDPR_COOKIE_DATA_CONTROLLER', ''),
|
'gdprCookieDataController' => Configuration::get('GDPR_COOKIE_DATA_CONTROLLER', ''),
|
||||||
'gdprCookieRetentionPeriod' => Configuration::get('GDPR_COOKIE_RETENTION_PERIOD', '365 days'),
|
'gdprCookieRetentionPeriod' => Configuration::get('GDPR_COOKIE_RETENTION_PERIOD', '365 days'),
|
||||||
'gdprCookieThirdParties' => Configuration::get('GDPR_COOKIE_THIRD_PARTIES', ''),
|
'gdprCookieThirdParties' => Configuration::get('GDPR_COOKIE_THIRD_PARTIES', ''),
|
||||||
@ -339,10 +337,7 @@ class GdprCookieConsent extends Module
|
|||||||
'gdprCookieDecline' => Configuration::get('GDPR_COOKIE_DECLINE'),
|
'gdprCookieDecline' => Configuration::get('GDPR_COOKIE_DECLINE'),
|
||||||
'gdprCookieSettings' => Configuration::get('GDPR_COOKIE_SETTINGS'),
|
'gdprCookieSettings' => Configuration::get('GDPR_COOKIE_SETTINGS'),
|
||||||
'gdprCookieMoreInfo' => Configuration::get('GDPR_COOKIE_MORE_INFO'),
|
'gdprCookieMoreInfo' => Configuration::get('GDPR_COOKIE_MORE_INFO'),
|
||||||
'gdprCookieMoreInfoUrl' => $this->context->link->getCMSLink(
|
'gdprCookieMoreInfoUrl' => Configuration::get('GDPR_COOKIE_MORE_INFO_URL'),
|
||||||
Configuration::get('GDPR_COOKIE_MORE_INFO_URL')
|
|
||||||
),
|
|
||||||
// New variables
|
|
||||||
'gdprCookieDataController' => Configuration::get('GDPR_COOKIE_DATA_CONTROLLER'),
|
'gdprCookieDataController' => Configuration::get('GDPR_COOKIE_DATA_CONTROLLER'),
|
||||||
'gdprCookieRetentionPeriod' => Configuration::get('GDPR_COOKIE_RETENTION_PERIOD'),
|
'gdprCookieRetentionPeriod' => Configuration::get('GDPR_COOKIE_RETENTION_PERIOD'),
|
||||||
'gdprCookieThirdParties' => Configuration::get('GDPR_COOKIE_THIRD_PARTIES'),
|
'gdprCookieThirdParties' => Configuration::get('GDPR_COOKIE_THIRD_PARTIES'),
|
||||||
|
@ -68,25 +68,27 @@ document.addEventListener('DOMContentLoaded', function() {
|
|||||||
document.getElementById('gdpr-cookie-banner-decline').addEventListener('click', function() {
|
document.getElementById('gdpr-cookie-banner-decline').addEventListener('click', function() {
|
||||||
declineAllCookies();
|
declineAllCookies();
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
document.getElementById('gdpr-cookie-banner-settings').addEventListener('click', function() {
|
document.getElementById('gdpr-cookie-banner-settings').addEventListener('click', function() {
|
||||||
showModal();
|
showModal();
|
||||||
|
});
|
||||||
|
|
||||||
|
// Modal buttons
|
||||||
|
if(!gdprCookieOnlyRequired) {
|
||||||
|
document.getElementById('gdpr-cookie-decline').addEventListener('click', function() {
|
||||||
|
declineAllCookies();
|
||||||
|
});
|
||||||
|
|
||||||
|
document.getElementById('gdpr-cookie-accept-selected').addEventListener('click', function() {
|
||||||
|
acceptSelectedCookies();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// Modal buttons
|
|
||||||
document.getElementById('gdpr-cookie-accept-all').addEventListener('click', function() {
|
document.getElementById('gdpr-cookie-accept-all').addEventListener('click', function() {
|
||||||
acceptAllCookies();
|
acceptAllCookies();
|
||||||
});
|
});
|
||||||
|
|
||||||
document.getElementById('gdpr-cookie-decline').addEventListener('click', function() {
|
|
||||||
declineAllCookies();
|
|
||||||
});
|
|
||||||
|
|
||||||
document.getElementById('gdpr-cookie-accept-selected').addEventListener('click', function() {
|
|
||||||
acceptSelectedCookies();
|
|
||||||
});
|
|
||||||
|
|
||||||
// Manage button (for after consent is given)
|
// Manage button (for after consent is given)
|
||||||
document.getElementById('gdpr-cookie-manage').addEventListener('click', function() {
|
document.getElementById('gdpr-cookie-manage').addEventListener('click', function() {
|
||||||
showModal();
|
showModal();
|
||||||
|
@ -49,8 +49,10 @@
|
|||||||
<div class="gdpr-cookie-modal-footer">
|
<div class="gdpr-cookie-modal-footer">
|
||||||
<a href="{$gdprCookieMoreInfoUrl}" class="gdpr-cookie-more-info">{$gdprCookieMoreInfo}</a>
|
<a href="{$gdprCookieMoreInfoUrl}" class="gdpr-cookie-more-info">{$gdprCookieMoreInfo}</a>
|
||||||
<div class="gdpr-cookie-buttons">
|
<div class="gdpr-cookie-buttons">
|
||||||
<button id="gdpr-cookie-decline" class="gdpr-cookie-decline">{$gdprCookieDecline}</button>
|
{if !$gdprCookieOnlyRequired}
|
||||||
<button id="gdpr-cookie-accept-selected" class="gdpr-cookie-accept-selected">{l s='Accept Selected' mod='gdprcookieconsent'}</button>
|
<button id="gdpr-cookie-decline" class="gdpr-cookie-decline">{$gdprCookieDecline}</button>
|
||||||
|
<button id="gdpr-cookie-accept-selected" class="gdpr-cookie-accept-selected">{l s='Accept Selected' mod='gdprcookieconsent'}</button>
|
||||||
|
{/if}
|
||||||
<button id="gdpr-cookie-accept-all" class="gdpr-cookie-accept-all">{$gdprCookieAccept}</button>
|
<button id="gdpr-cookie-accept-all" class="gdpr-cookie-accept-all">{$gdprCookieAccept}</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -67,8 +69,8 @@
|
|||||||
<div class="gdpr-cookie-banner-buttons">
|
<div class="gdpr-cookie-banner-buttons">
|
||||||
{if !$gdprCookieOnlyRequired}
|
{if !$gdprCookieOnlyRequired}
|
||||||
<button id="gdpr-cookie-banner-decline" class="gdpr-cookie-banner-decline">{$gdprCookieDecline}</button>
|
<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}
|
{/if}
|
||||||
|
<button id="gdpr-cookie-banner-settings" class="gdpr-cookie-banner-settings">{$gdprCookieSettings}</button>
|
||||||
<button id="gdpr-cookie-banner-accept" class="gdpr-cookie-banner-accept">{$gdprCookieAccept}</button>
|
<button id="gdpr-cookie-banner-accept" class="gdpr-cookie-banner-accept">{$gdprCookieAccept}</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user