govuk_publishing_components 17.2.0 → 17.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/govuk_publishing_components/components/cookie-banner.js +2 -2
- data/app/assets/javascripts/govuk_publishing_components/lib/cookie-functions.js +7 -3
- data/lib/govuk_publishing_components/version.rb +1 -1
- data/node_modules/accessible-autocomplete/package.json +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d8d0ab99194724645bf31d90bd97f382c7d96eb78ba3124212ef67841e26eaa9
|
4
|
+
data.tar.gz: 46acbcb1849d70d4d39435d895dad649c6f9fd2b2ed0b98d4f25cb3c590e98c0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3aff26f7fe04fe35df73df9035f803b0f4841fca31f4bfd278f10cdeadb171738e451ad650063affe6ec56b5876a74542b2409c795e025edf252b4dd795e24a9
|
7
|
+
data.tar.gz: 72aefb086c9c5f7de2168dc545ae3c14da0d36c90b34aa0d3540f32804e7ca23049108232c8708a1371b225e5d254fa010f46916edec10c6f16db0112613c0e5
|
@@ -46,7 +46,7 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
|
|
46
46
|
// This involves resetting the seen_cookie_message cookie, which may be set to true if they've seen the old cookie banner
|
47
47
|
if (!window.GOVUK.cookie('cookie_policy')) {
|
48
48
|
if (window.GOVUK.cookie('seen_cookie_message') === 'true') {
|
49
|
-
window.GOVUK.cookie('seen_cookie_message', false)
|
49
|
+
window.GOVUK.cookie('seen_cookie_message', false, { days: 365 })
|
50
50
|
}
|
51
51
|
}
|
52
52
|
|
@@ -95,7 +95,7 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
|
|
95
95
|
CookieBanner.prototype.setCookieConsent = function () {
|
96
96
|
window.GOVUK.approveAllCookieTypes()
|
97
97
|
this.$module.showConfirmationMessage()
|
98
|
-
window.GOVUK.
|
98
|
+
window.GOVUK.cookie('seen_cookie_message', 'true', { days: 365 })
|
99
99
|
}
|
100
100
|
|
101
101
|
CookieBanner.prototype.showConfirmationMessage = function () {
|
@@ -52,6 +52,10 @@
|
|
52
52
|
if (value === false || value === null) {
|
53
53
|
return window.GOVUK.setCookie(name, '', { days: -1 })
|
54
54
|
} else {
|
55
|
+
// Default expiry date of 30 days
|
56
|
+
if (typeof options === 'undefined') {
|
57
|
+
options = { days: 30 }
|
58
|
+
}
|
55
59
|
return window.GOVUK.setCookie(name, value, options)
|
56
60
|
}
|
57
61
|
} else {
|
@@ -60,7 +64,7 @@
|
|
60
64
|
}
|
61
65
|
|
62
66
|
window.GOVUK.setDefaultConsentCookie = function () {
|
63
|
-
window.GOVUK.setCookie('cookie_policy', JSON.stringify(DEFAULT_COOKIE_CONSENT))
|
67
|
+
window.GOVUK.setCookie('cookie_policy', JSON.stringify(DEFAULT_COOKIE_CONSENT), { days: 365 })
|
64
68
|
}
|
65
69
|
|
66
70
|
window.GOVUK.approveAllCookieTypes = function () {
|
@@ -71,7 +75,7 @@
|
|
71
75
|
'campaigns': true
|
72
76
|
}
|
73
77
|
|
74
|
-
window.GOVUK.setCookie('cookie_policy', JSON.stringify(approvedConsent))
|
78
|
+
window.GOVUK.setCookie('cookie_policy', JSON.stringify(approvedConsent), { days: 365 })
|
75
79
|
}
|
76
80
|
|
77
81
|
window.GOVUK.getConsentCookie = function () {
|
@@ -119,7 +123,7 @@
|
|
119
123
|
}
|
120
124
|
}
|
121
125
|
|
122
|
-
window.GOVUK.setCookie('cookie_policy', JSON.stringify(cookieConsent))
|
126
|
+
window.GOVUK.setCookie('cookie_policy', JSON.stringify(cookieConsent), { days: 365 })
|
123
127
|
}
|
124
128
|
|
125
129
|
window.GOVUK.checkConsentCookieCategory = function (cookieName, cookieCategory) {
|
@@ -49,7 +49,7 @@
|
|
49
49
|
"/"
|
50
50
|
],
|
51
51
|
"_resolved": "git://github.com/alphagov/accessible-autocomplete.git#3523dd9fffc70cbd9f6f555f75863c33a709f49e",
|
52
|
-
"_shasum": "
|
52
|
+
"_shasum": "bf260bba0f5f18e54c3836452236c44d88b9c40f",
|
53
53
|
"_shrinkwrap": null,
|
54
54
|
"_spec": "accessible-autocomplete@git://github.com/alphagov/accessible-autocomplete.git#add-multiselect-support",
|
55
55
|
"_where": "/var/lib/jenkins/workspace/ublishing_components_master-N4FWJIUY4CIFHKGZOAAEVVXODRY3YBORQOPIBBXWX72VUPSGJRRQ",
|