mirror of
https://github.com/pretix/pretix.git
synced 2026-05-05 15:14:04 +00:00
Fix #1912 -- Auto-open all <details> with an error inside
This commit is contained in:
@@ -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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user