diff --git a/src/pretix/presale/templates/pretixpresale/event/index.html b/src/pretix/presale/templates/pretixpresale/event/index.html index bdf15927e1..c37843d0b5 100644 --- a/src/pretix/presale/templates/pretixpresale/event/index.html +++ b/src/pretix/presale/templates/pretixpresale/event/index.html @@ -242,13 +242,6 @@ {% endif %} - {% 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" %} -
- {% enddialog %} - {% endif %} {% endif %} {% endif %} diff --git a/src/pretix/presale/templates/pretixpresale/fragment_modals.html b/src/pretix/presale/templates/pretixpresale/fragment_modals.html index 8855851709..b62906d3eb 100644 --- a/src/pretix/presale/templates/pretixpresale/fragment_modals.html +++ b/src/pretix/presale/templates/pretixpresale/fragment_modals.html @@ -123,3 +123,9 @@ {% endwith %} {% endif %} {% endif %} + +{% 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" %} + +{% enddialog %} diff --git a/src/pretix/static/pretixpresale/js/ui/main.js b/src/pretix/static/pretixpresale/js/ui/main.js index ed4ec1c0ed..5290d20f9c 100644 --- a/src/pretix/static/pretixpresale/js/ui/main.js +++ b/src/pretix/static/pretixpresale/js/ui/main.js @@ -481,7 +481,7 @@ $(function () { $("form:has(#btn-add-to-cart)").on("submit", function(e) { if ( (this.classList.contains("has-seating") && this.querySelector("pretix-seating-checkout-button button")) || - this.querySelector("input[type=checkbox]:checked") || + this.querySelector("input[type=checkbox]:checked, input[type=radio]:checked") || [...this.querySelectorAll(".input-item-count:not([type=hidden])")].some(input => input.value && input.value !== "0") // TODO: seating adds a hidden seating-dummy-item-count, which is not useful and should at some point be removed ) { // okay, let the submit-event bubble to async-task