forked from CGM_Public/pretix_original
[A11y] Fix cookie-consent-form labels + help-text markup (#5113)
* [A11y] Fix cookie-consent-form labels + help-text markup * remove method=dialog for now
This commit is contained in:
committed by
GitHub
parent
6b331888e9
commit
bf3ee608ba
@@ -55,6 +55,7 @@
|
|||||||
<div class="modal-card-content">
|
<div class="modal-card-content">
|
||||||
<h3 id="cookie-consent-modal-label"></h3>
|
<h3 id="cookie-consent-modal-label"></h3>
|
||||||
<div id="cookie-consent-modal-description">
|
<div id="cookie-consent-modal-description">
|
||||||
|
<form class="form-horizontal">
|
||||||
{% with request.event|default:request.organizer as sh %}
|
{% with request.event|default:request.organizer as sh %}
|
||||||
<h3>{{ sh.settings.cookie_consent_dialog_title }}</h3>
|
<h3>{{ sh.settings.cookie_consent_dialog_title }}</h3>
|
||||||
{{ sh.settings.cookie_consent_dialog_text|rich_text }}
|
{{ sh.settings.cookie_consent_dialog_text|rich_text }}
|
||||||
@@ -70,40 +71,42 @@
|
|||||||
</summary>
|
</summary>
|
||||||
<div class="checkbox">
|
<div class="checkbox">
|
||||||
<label>
|
<label>
|
||||||
<input type="checkbox" disabled checked="">
|
<input type="checkbox" disabled checked="" aira-describedby="cookie-consent-checkbox-required-description">
|
||||||
{% trans "Required cookies" %}<br>
|
{% trans "Required cookies" %}
|
||||||
<span class="text-muted">
|
|
||||||
{% trans "Functional cookies (e.g. shopping cart, login, payment, language preference) and technical cookies (e.g. security purposes)" %}
|
|
||||||
</span>
|
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="help-block" id="cookie-consent-checkbox-required-description">
|
||||||
|
<p>{% trans "Functional cookies (e.g. shopping cart, login, payment, language preference) and technical cookies (e.g. security purposes)" %}</p>
|
||||||
|
</div>
|
||||||
{% for cp in cookie_providers %}
|
{% for cp in cookie_providers %}
|
||||||
<div class="checkbox">
|
<div class="checkbox">
|
||||||
<label>
|
<label>
|
||||||
<input type="checkbox" name="{{ cp.identifier }}">
|
<input type="checkbox" name="{{ cp.identifier }}" aira-describedby="cookie-consent-checkbox-{{ cp.identifier }}-description">
|
||||||
{{ cp.provider_name }}<br>
|
{{ cp.provider_name }}
|
||||||
<span class="text-muted">
|
|
||||||
{% for c in cp.usage_classes %}
|
|
||||||
{% if forloop.counter0 > 0 %}· {% endif %}
|
|
||||||
{% if c.value == 1 %}
|
|
||||||
{% trans "Functionality" context "cookie_usage" %}
|
|
||||||
{% elif c.value == 2 %}
|
|
||||||
{% trans "Analytics" context "cookie_usage" %}
|
|
||||||
{% elif c.value == 3 %}
|
|
||||||
{% trans "Marketing" context "cookie_usage" %}
|
|
||||||
{% elif c.value == 4 %}
|
|
||||||
{% trans "Social features" context "cookie_usage" %}
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
{% if cp.privacy_url %}
|
|
||||||
·
|
|
||||||
<a href="{% safelink cp.privacy_url %}" target="_blank">
|
|
||||||
{% trans "Privacy policy" %}
|
|
||||||
</a>
|
|
||||||
{% endif %}
|
|
||||||
</span>
|
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="help-block" id="cookie-consent-checkbox-{{ cp.identifier }}-description">
|
||||||
|
<p>
|
||||||
|
{% for c in cp.usage_classes %}
|
||||||
|
{% if forloop.counter0 > 0 %}· {% endif %}
|
||||||
|
{% if c.value == 1 %}
|
||||||
|
{% trans "Functionality" context "cookie_usage" %}
|
||||||
|
{% elif c.value == 2 %}
|
||||||
|
{% trans "Analytics" context "cookie_usage" %}
|
||||||
|
{% elif c.value == 3 %}
|
||||||
|
{% trans "Marketing" context "cookie_usage" %}
|
||||||
|
{% elif c.value == 4 %}
|
||||||
|
{% trans "Social features" context "cookie_usage" %}
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
{% if cp.privacy_url %}
|
||||||
|
·
|
||||||
|
<a href="{% safelink cp.privacy_url %}" target="_blank">
|
||||||
|
{% trans "Privacy policy" %}
|
||||||
|
</a>
|
||||||
|
{% endif %}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</details>
|
</details>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -130,6 +133,7 @@
|
|||||||
</p>
|
</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endwith %}
|
{% endwith %}
|
||||||
|
<form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -53,6 +53,15 @@ a.btn, button.btn {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.checkbox + .help-block {
|
||||||
|
padding-left: 20px;
|
||||||
|
margin-top: 0;
|
||||||
|
margin-bottom: 0;
|
||||||
|
p {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
output {
|
output {
|
||||||
padding-top: $padding-base-vertical;
|
padding-top: $padding-base-vertical;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user