forked from CGM_Public/pretix_original
[A11y] switch modal dialogs to <dialog> tag (#5128)
* add templatetag {% dialog %} using <dialog> tag
* new dialog style
* show dialog when empty add-to-cart instead of disabling the button
* update cookieconsent-modal to use new template tag
This commit is contained in:
committed by
GitHub
parent
bf47da521c
commit
7c59ec51ca
@@ -7,6 +7,8 @@
|
||||
{% load thumb %}
|
||||
{% load eventsignal %}
|
||||
{% load rich_text %}
|
||||
{% load icon %}
|
||||
{% load dialog %}
|
||||
|
||||
{% block title %}
|
||||
{% if "year" in request.GET %}
|
||||
@@ -240,6 +242,13 @@
|
||||
</div>
|
||||
{% endif %}
|
||||
</form>
|
||||
{% if ev.presale_is_running and display_add_to_cart %}
|
||||
{% trans "You didn’t select any ticket." as label_nothing_to_add %}
|
||||
{% trans "Please tick a checkbox or enter a quantity for one of the ticket types to add to the cart." as description_nothing_to_add %}
|
||||
{% dialog "dialog-nothing-to-add" label_nothing_to_add description_nothing_to_add icon="exclamation-circle" %}
|
||||
<p class="modal-card-confirm"><button class="btn btn-primary">{% trans "OK" %}</button></p>
|
||||
{% enddialog %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</main>
|
||||
|
||||
Reference in New Issue
Block a user