diff --git a/CHANGELOG.md b/CHANGELOG.md index d75bc71..b57b6a8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +## [2.0.4] +* Update toggle slider status after visitors accept all cookies. + ## [2.0.3] * Replace H1 tags with H3 tags diff --git a/view/frontend/web/js/model/cookie.js b/view/frontend/web/js/model/cookie.js index cbcf2b0..31c1757 100644 --- a/view/frontend/web/js/model/cookie.js +++ b/view/frontend/web/js/model/cookie.js @@ -18,6 +18,8 @@ define([ $.each(systemNames, function (index, value) { var sysName = 'cg_' + value; data[sysName] = 1; + var checkboxSelector = '.phpro-cookie-consent-modal .consent-tab-content.' + value + ' .cookie-toggle input'; + $(checkboxSelector).prop('checked', data[sysName]); }); data['expire'] = expiration; data['secure'] = secure;