Skip to content
This repository has been archived by the owner on Apr 23, 2024. It is now read-only.

Commit

Permalink
Merge pull request #5 from bona-kim/update-toggle-sliders-on-accept-all
Browse files Browse the repository at this point in the history
update toggle sliders when the visitor accepts all cookies
  • Loading branch information
lykciv authored Mar 10, 2022
2 parents 18f9735 + 74630a9 commit 038255f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 2 additions & 0 deletions view/frontend/web/js/model/cookie.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 038255f

Please sign in to comment.