{% from 'bootstrap4/form.html' import render_form %}

{% extends 'admin-layout.html' %}

{% block body %}
{{super()}}



<div class="card">
    <div class="card-header">{{_("admin.config.title")}}
    </div>
    <div class="card-body">
        <div class="row">
            <div class="col-12">
                {{render_form(form,form_type="",extra_classes="card-columns")}}
            </div>
        </div>
    </div>
</div>

<style>
    fieldset{
        background-color: #fff;
        background-clip: border-box;
        border: 1 solid rgba(0, 0, 0, 0.125);
        border-radius: 0.25rem;
        box-shadow: 0 0 1px rgb(0 0 0 / 13%), 0 1px 3px rgb(0 0 0 / 20%);
        margin-bottom: 1rem;
        padding: 10px;
        display: inline-block;
        width: 100%;
    }
    legend{
        background-color: white;
        margin: 0px;
    }
    legend+div>label {
        display: none;
    }

@media (min-width: 576px) {
    .card-columns {
        column-count: 1;
    }
}

@media (min-width: 768px) {
    .card-columns {
        column-count: 2;
    }
}
fieldset {
    box-shadow:none;
    margin-bottom:0px;
}

</style>

{% endblock %}

% block tail
{{super()}}
<script>
// $("fieldset .form-group").hide()
$("fieldset").filter(function() { return !($(this).children().children().is('.invalid-feedback')); }).find('.form-group').hide()
$("fieldset legend").click(function(e){
    $(this.parentNode).find('.form-group').toggle('fade')
    
    
})
</script>
%endblock