From 488273d5f2abd91910e89f01eae15ccf96d325a6 Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Mon, 15 Feb 2021 18:30:06 +0100 Subject: [PATCH] Fix #1912 -- Auto-open all
with an error inside --- src/pretix/static/pretixbase/js/details.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/pretix/static/pretixbase/js/details.js b/src/pretix/static/pretixbase/js/details.js index 2c8ab2024..eadd8a4a5 100644 --- a/src/pretix/static/pretixbase/js/details.js +++ b/src/pretix/static/pretixbase/js/details.js @@ -41,7 +41,12 @@ setup_collapsible_details = function (el) { $detailsNotSummary = $details.children(':not(summary)'); $details.prop('open', typeof $details.attr('open') == 'string'); if (!$details.prop('open')) { - $detailsNotSummary.hide(); + if ($details.find(".has-error, .alert-danger").length) { + $details.addClass("details-open"); + $details.prop('open', true); + } else { + $detailsNotSummary.hide(); + } } else { $details.addClass("details-open"); }