mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-09 19:04:33 -04:00
Default the cookie banner to be hidden
It should only be shown if JS is available and the cookieMessage JS finds consent has not been set.
This commit is contained in:
@@ -51,15 +51,10 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
|
||||
// Show the cookie banner if not in the cookie settings page
|
||||
if (!this.isInCookiesPage()) {
|
||||
var hasCookiesPolicy = window.GOVUK.cookie('cookies_policy');
|
||||
var shouldHaveCookieMessage = (this.$module && !hasCookiesPolicy);
|
||||
|
||||
if (shouldHaveCookieMessage) {
|
||||
if (this.$module && !hasCookiesPolicy) {
|
||||
this.$module.style.display = 'block';
|
||||
} else {
|
||||
this.$module.style.display = 'none';
|
||||
}
|
||||
} else {
|
||||
this.$module.style.display = 'none';
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user