New accordion panels using <fieldset> (#4681)

This commit is contained in:
Mira
2024-12-04 14:34:42 +01:00
committed by GitHub
parent 4d94158ff0
commit 6317233150
5 changed files with 26 additions and 9 deletions

View File

@@ -243,6 +243,11 @@ function setup_basics(el) {
$($(this).attr("data-target")).collapse('show');
}
});
$("fieldset.accordion-panel > legend input[type=radio]").change(function() {
$(this).closest("fieldset").siblings("fieldset").prop('disabled', true);
$(this).closest("fieldset").prop('disabled', false);
}).each(function() { $(this).closest("fieldset").prop('disabled', true); }).filter(":checked").trigger('change');
el.find(".js-only").removeClass("js-only");
el.find(".js-hidden").hide();