File tree 3 files changed +21
-3
lines changed
3 files changed +21
-3
lines changed Original file line number Diff line number Diff line change @@ -115,9 +115,12 @@ The following properties are available:
115
115
consent:
116
116
actions:
117
117
- accept
118
- - manage
118
+ - manage # (1)!
119
119
` ` `
120
120
121
+ 1. If the `manage` settings button is omitted from the `actions` property,
122
+ the settings are always shown.
123
+
121
124
The cookie consent form includes three types of buttons :
122
125
123
126
- ` accept` – Button to accept selected cookies
Original file line number Diff line number Diff line change 16
16
{% if not actions %}
17
17
{% set actions = ["accept", "manage"] %}
18
18
{% endif %}
19
+ {% if not "manage" in actions %}
20
+ {% set checked = "checked" %}
21
+ {% endif %}
19
22
< h4 > {{ config.extra.consent.title }}</ h4 >
20
23
< p > {{ config.extra.consent.description }}</ p >
21
- < input type =" checkbox " class ="md-toggle " id ="__settings ">
24
+ < input class ="md-toggle " type =" checkbox " id ="__settings " {{ checked }} >
22
25
< div class ="md-consent__settings ">
23
26
< ul class ="task-list ">
27
+ {% set checked = "" %}
24
28
{% for type in cookies %}
25
29
{% if cookies[type] is string %}
26
30
{% set name = cookies[type] %}
Original file line number Diff line number Diff line change 39
39
{% set actions = ["accept", "manage"] %}
40
40
{% endif %}
41
41
42
+ <!-- Determine initial settings state -->
43
+ {% if not "manage" in actions %}
44
+ {% set checked = "checked" %}
45
+ {% endif %}
46
+
42
47
<!-- Consent title -->
43
48
< h4 > {{ config.extra.consent.title }}</ h4 >
44
49
< p > {{ config.extra.consent.description }}</ p >
45
50
46
51
<!-- Consent settings -->
47
- < input type ="checkbox " class ="md-toggle " id ="__settings " />
52
+ < input
53
+ class ="md-toggle "
54
+ type ="checkbox "
55
+ id ="__settings "
56
+ {{ checked }}
57
+ />
48
58
< div class ="md-consent__settings ">
49
59
< ul class ="task-list ">
60
+ {% set checked = "" %}
50
61
{% for type in cookies %}
51
62
{% if cookies[type] is string %}
52
63
{% set name = cookies[type] %}
You can’t perform that action at this time.
0 commit comments