Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UHF-10738 Cookie policy #821

Merged
merged 53 commits into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from 51 commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
ec1cf4e
Added install hook for the hdbt_cookie_banner to uninstall eu_cookie_…
khalima Oct 2, 2024
1cafa5b
UHF-10738: Added JS libraries for the HDS cookie consent and HDBT Coo…
khalima Oct 3, 2024
766babf
UHF-10738: Added schema definitions for the configuration variables.
khalima Oct 3, 2024
3537830
UHF-10738: Added theme hook and a template for the new cookie policy …
khalima Oct 3, 2024
899c365
UHF-10738: Added language, theme and settingsPageSelector variables f…
khalima Oct 3, 2024
915eb0f
UHF-10738: New route and controller for the cookie policy page.
khalima Oct 3, 2024
779efb4
UHF-10738: Handled translations for hdbt_cookie_banner.
khalima Oct 3, 2024
60074c3
UHF-10738: Added new variables to the cookie banner settings form.
khalima Oct 3, 2024
dd86658
UHF-10738: Added default settings for the cookie banner.
khalima Oct 3, 2024
fc93f0e
UHF-10738: Added deprecation comments to EU cookie compliance related…
khalima Oct 3, 2024
ae2f0a5
UHF-10738: Show / Hide the JSON editor based on the use_custom_settin…
khalima Oct 3, 2024
10bfc39
UHF-10738: Customized the cookie banner admin form and added the need…
khalima Oct 3, 2024
4c67054
UHF-10738: Handle the three different scenarios of loading the HDS co…
khalima Oct 3, 2024
1d36c25
UHF-10738: Switched variable to "use_internal_hds_cookie_js" as it ma…
khalima Oct 4, 2024
75cdb6b
UHF-10738: Set maxlength for the HDS cookie consent JavaScript URL.
khalima Oct 4, 2024
59a8056
UHF-10738: Convert the markup type field to item as that can be contr…
khalima Oct 4, 2024
9b59a6e
UHF-10738: Removed obsolete code.
khalima Oct 4, 2024
5c35af7
UHF-10738: Check also that the "use custom settings" variable is not …
khalima Oct 4, 2024
27bde78
UHF-10738: Better naming for the cookie policy page controller.
khalima Oct 4, 2024
4edbd6f
UHF-10738: Removed obsolete JS, as the states work with items.
khalima Oct 7, 2024
ed8a9a6
UHF-10738: Fixed phpcs
khalima Oct 7, 2024
aa726cb
UHF-10738: Include the typedConfigManager when calling ConfigFormBase…
khalima Oct 7, 2024
df3e092
UHF-10738: Added tests.
khalima Oct 7, 2024
1e1bb2c
UHF-10738: Merge branch 'main' of https://github.com/City-of-Helsinki…
khalima Oct 7, 2024
aa3655e
UHF-10738: Remove the obsolete update hook and install hdbt cookie ba…
khalima Oct 7, 2024
bd86e8f
UHF-10738: Sort use statements alphabetically.
khalima Oct 7, 2024
622c16d
UHF-10738: Fixed comment.
khalima Oct 7, 2024
aa92f30
UHF-10738: Decided to discard the theme and settings page selectors.
khalima Oct 7, 2024
235c943
UHF-10738: Corrections to field descriptions.
khalima Oct 7, 2024
b5d8dbd
UHF-10738: Use default values for the theme and settings page selector.
khalima Oct 7, 2024
ad6d52f
UHF-10738: Return either redirect response or render array, based on …
khalima Oct 8, 2024
02377e4
UHF-10738: Remove the installation function for now and do the eu coo…
khalima Oct 8, 2024
53b88bc
UHF-10738: Fixed typo.
khalima Oct 8, 2024
dfdfddd
UHF-10461: Add support for language direction by rewriting whole editor.
Arkkimaagi Oct 8, 2024
9b6e2b2
UHF-10461: Clean code
Arkkimaagi Oct 8, 2024
29538b4
UHF-10738: Removed helfi_eu_cookie_compliance dependency.
khalima Oct 8, 2024
3744af8
UHF-10461: Improve submit button handling on unsaved data
Arkkimaagi Oct 8, 2024
12dee5b
Merge pull request #822 from City-of-Helsinki/UHF-10461_fixed_cookie_…
Arkkimaagi Oct 8, 2024
f13b9da
UHF-10738: Fixed langcode naming.
khalima Oct 8, 2024
3658eec
UHF-10738: Merge branch 'UHF-10738' of https://github.com/City-of-Hel…
khalima Oct 8, 2024
0bda83a
UHF-10738: Readded the dependency to eu_cookie_compliance module to p…
khalima Oct 8, 2024
fa39f9e
UHF-10738: Added deprecation mentions to JS files which depends on eu…
khalima Oct 8, 2024
b3bf508
UHF-10738: Move spacer to footer so it works
teroelonen Oct 8, 2024
0d6cfd1
UHF-10738: Added todo comment to check whether the controller is stil…
khalima Oct 8, 2024
bb0282b
UHF-10738: Merge branch 'UHF-10738' of https://github.com/City-of-Hel…
khalima Oct 8, 2024
9d0100d
UHF-10738: Update latest banner code, one that does not report wanted…
Arkkimaagi Oct 8, 2024
ad0b64b
UHF-10738: Added the cookie banner link to Helfi-tools menu and added…
khalima Oct 8, 2024
be2bc9c
UHF-10738: Change the css selector to a bit more readable format
teroelonen Oct 8, 2024
9234921
UHF-10738: Merge branch 'UHF-10738' of https://github.com/City-of-Hel…
teroelonen Oct 8, 2024
524f5c3
UHF-10738: Fixed texts.
khalima Oct 9, 2024
9491a82
UHF-10738: Merge branch 'UHF-10738' of https://github.com/City-of-Hel…
khalima Oct 9, 2024
5035ec8
UHF-10738: Update json schema with latest fixes
Arkkimaagi Oct 10, 2024
8f5dd4a
UHF-10738: Update latest banner js that contains ready event for exte…
Arkkimaagi Oct 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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