forked from CGM_Public/pretix_original
Simplify empty add-to-cart check (#5177)
This commit is contained in:
committed by
GitHub
parent
8ad0944dcf
commit
fe0b8c9f97
@@ -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
|
||||
) {
|
||||
|
||||
Reference in New Issue
Block a user