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

@@ -33,9 +33,17 @@
$('.form-is_rig').hide(); $('.form-is_rig').hide();
{% endif %} {% endif %}
//Creation //Creation
{% else %}
// 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 %} {% else %}
//Initial hide //Initial hide
$('.form-hws').slideUp(dur); $('.form-hws').slideUp(dur);
{% endif %}
//Button handling //Button handling
$('#is_rig-selector button').on('click', function () { $('#is_rig-selector button').on('click', function () {
$('.form-non_rig').slideDown(dur); //Non rig stuff also needed for rig, so always slide down $('.form-non_rig').slideDown(dur); //Non rig stuff also needed for rig, so always slide down