mirror of
https://github.com/pretix/pretix.git
synced 2026-08-07 10:17:49 +00:00
Add missing error handling to addressform.js
This commit is contained in:
@@ -45,7 +45,15 @@ $(function () {
|
|||||||
}).always(function() {
|
}).always(function() {
|
||||||
loader.hide();
|
loader.hide();
|
||||||
}).fail(function(){
|
}).fail(function(){
|
||||||
// TODO: handle failed request
|
// In case of errors, show everything and require nothing, we can still handle errors in backend
|
||||||
|
for(var k in dependents) {
|
||||||
|
const dependent = dependents[k],
|
||||||
|
visible = true,
|
||||||
|
required = false;
|
||||||
|
|
||||||
|
dependent.closest(".form-group").toggle(visible).toggleClass('required', required);
|
||||||
|
dependent.prop("required", required);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
dependents.state.prop("data-selected-value", dependents.state.val());
|
dependents.state.prop("data-selected-value", dependents.state.val());
|
||||||
|
|||||||
Reference in New Issue
Block a user