From 006f520f3719d7e3aa5193a04ec43dee8a485249 Mon Sep 17 00:00:00 2001 From: squidfunk Date: Fri, 28 Oct 2022 16:41:14 +0700 Subject: [PATCH] Added support for always showing settings in cookie consent --- docs/setup/ensuring-data-privacy.md | 5 ++++- material/partials/consent.html | 6 +++++- src/partials/consent.html | 13 ++++++++++++- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/docs/setup/ensuring-data-privacy.md b/docs/setup/ensuring-data-privacy.md index d9fb37a3e..198398fa7 100644 --- a/docs/setup/ensuring-data-privacy.md +++ b/docs/setup/ensuring-data-privacy.md @@ -115,9 +115,12 @@ The following properties are available: consent: actions: - accept - - manage + - manage # (1)! ``` + 1. If the `manage` settings button is omitted from the `actions` property, + the settings are always shown. + The cookie consent form includes three types of buttons: - `accept` – Button to accept selected cookies diff --git a/material/partials/consent.html b/material/partials/consent.html index afb7038f6..e8ae2c83c 100644 --- a/material/partials/consent.html +++ b/material/partials/consent.html @@ -16,11 +16,15 @@ {% if not actions %} {% set actions = ["accept", "manage"] %} {% endif %} +{% if not "manage" in actions %} + {% set checked = "checked" %} +{% endif %}

{{ config.extra.consent.title }}

{{ config.extra.consent.description }}

- +