FIX Event form not displaying properly on creation error

Turns out that bit of code was needed ya goof
This commit is contained in:
2021-04-08 19:23:13 +01:00
parent 780d05e27c
commit 5976ce9ea2

View File

@@ -34,8 +34,16 @@
{% endif %}
//Creation
{% else %}
//Initial hide
$('.form-hws').slideUp(dur);
// If there were errors, apply the previous Rig/not-Rig selection
{% if form.errors %}
$('.form-hws').show();
if ($('#{{form.is_rig.auto_id}}').attr('checked') !== 'checked') {
$('.form-is_rig').hide();
}
{% else %}
//Initial hide
$('.form-hws').slideUp(dur);
{% endif %}
//Button handling
$('#is_rig-selector button').on('click', function () {
$('.form-non_rig').slideDown(dur); //Non rig stuff also needed for rig, so always slide down