mirror of
https://github.com/pretix/pretix.git
synced 2026-05-08 15:44:02 +00:00
Fix: make hidden form inputs visible, if invalid (Z#23110236)
This commit is contained in:
committed by
GitHub
parent
f9b51a8abb
commit
b4a7369642
@@ -23,6 +23,14 @@ function interpolate(fmt, object, named) {
|
||||
}
|
||||
|
||||
var form_handlers = function (el) {
|
||||
el.find('input, select, textarea').on('invalid', function (e) {
|
||||
if (!$(this).is(':visible')) {
|
||||
var panel = $(this).closest('.panel');
|
||||
if (!panel.attr('open')) panel.addClass('details-open').attr('open', true).children(':not(summary)').slideDown();
|
||||
if (!$(document.activeElement).is(':invalid')) this.focus();
|
||||
}
|
||||
});
|
||||
|
||||
el.find(".datetimepicker").each(function () {
|
||||
$(this).datetimepicker({
|
||||
format: $("body").attr("data-datetimeformat"),
|
||||
|
||||
Reference in New Issue
Block a user