forked from CGM_Public/pretix_original
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)');
|
$detailsNotSummary = $details.children(':not(summary)');
|
||||||
$details.prop('open', typeof $details.attr('open') == 'string');
|
$details.prop('open', typeof $details.attr('open') == 'string');
|
||||||
if (!$details.prop('open')) {
|
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 {
|
} else {
|
||||||
$details.addClass("details-open");
|
$details.addClass("details-open");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user