Skip to content

Commit

Permalink
Merge pull request #821 from City-of-Helsinki/UHF-10738
Browse files Browse the repository at this point in the history
UHF-10738 Cookie policy
  • Loading branch information
khalima authored Oct 10, 2024
2 parents 5abf9fb + 8f5dd4a commit 9cc7782
Show file tree
Hide file tree
Showing 32 changed files with 1,073 additions and 202 deletions.
2 changes: 2 additions & 0 deletions assets/js/chat_leijuke.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
console.warn(`No adapter found for ${chatSelection}!`);
}

// @todo UHF-8650: EU Cookie Compliance module will be removed.
// @todo UHF-8650: Convert the following code to support HDS cookie banner.
class EuCookieManager {
cookieCheck(cookieNames) {
let cookiesOk = true;
Expand Down
2 changes: 2 additions & 0 deletions assets/js/reactAndShareSettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
'use strict';

var loadReactAndShare = function () {
// @todo UHF-8650: EU Cookie Compliance module will be removed.
// @todo UHF-8650: Convert the following code to support HDS cookie banner.
if (Drupal.eu_cookie_compliance.hasAgreed('statistics')) {
window.rnsData = {
apiKey: drupalSettings.reactAndShareApiKey,
Expand Down
2 changes: 2 additions & 0 deletions assets/js/telia_ace.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
};
}

// @todo UHF-8650: EU Cookie Compliance module will be removed.
// @todo UHF-8650: Convert the following code to support HDS cookie banner.
// eslint-disable-next-line class-methods-use-this
cookieCheck() {
return Drupal.eu_cookie_compliance.hasAgreedWithCategory('chat');
Expand Down
2 changes: 2 additions & 0 deletions assets/js/user_consent_functions.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
(function (Drupal) {
'use strict';

// @todo UHF-8650: EU Cookie Compliance module will be removed.
// @todo UHF-8650: Convert the following code to support HDS cookie banner.
window.chat_user_consent = {
retrieveUserConsent: () => (Drupal.eu_cookie_compliance.hasAgreedWithCategory('chat')),
confirmUserConsent: () => {
Expand Down
1 change: 1 addition & 0 deletions helfi_platform_config.module
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ function helfi_platform_config_page_attachments_alter(array &$attachments): void
*/
function helfi_platform_config_theme() : array {
return [
// @todo Deprecated. Remove when the EU cookie compliance module is removed.
'cookie_consent_intro' => [
'variables' => [
'title' => NULL,
Expand Down
17 changes: 17 additions & 0 deletions modules/hdbt_cookie_banner/assets/css/cookie-banner-admin-ui.css
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,20 @@ textarea {
width: 100%;
height: 90dvh;
}

/* JSON Textarea error colors */
textarea.error {
border-color: #d9534f !important;
}

.alert-heading {
margin: 0;
}

.je-object__container:has(:not([style*="display: none;"]) > p[style="color: red;"]) > .je-object__title {
color: red;
}

input:not(:disabled) ~ .save-notice {
display: none;
}
Loading

0 comments on commit 9cc7782

Please sign in to comment.