From fe0b8c9f971a705699e19c47898168c08ed6fe0a Mon Sep 17 00:00:00 2001 From: Richard Schreiber Date: Wed, 28 May 2025 17:30:15 +0200 Subject: [PATCH] Simplify empty add-to-cart check (#5177) --- src/pretix/static/pretixpresale/js/ui/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pretix/static/pretixpresale/js/ui/main.js b/src/pretix/static/pretixpresale/js/ui/main.js index 3ca92fc5b..415c0adaf 100644 --- a/src/pretix/static/pretixpresale/js/ui/main.js +++ b/src/pretix/static/pretixpresale/js/ui/main.js @@ -456,7 +456,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("pretix-seating-checkout-button button") || 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 ) {