diff options
Diffstat (limited to 'ishtar_common/templates/blocks/bs_form_snippet.html')
-rw-r--r-- | ishtar_common/templates/blocks/bs_form_snippet.html | 30 |
1 files changed, 22 insertions, 8 deletions
diff --git a/ishtar_common/templates/blocks/bs_form_snippet.html b/ishtar_common/templates/blocks/bs_form_snippet.html index 8aa6a5333..f413fd860 100644 --- a/ishtar_common/templates/blocks/bs_form_snippet.html +++ b/ishtar_common/templates/blocks/bs_form_snippet.html @@ -4,9 +4,24 @@ {{form.non_field_errors}} </div> {%endif%} +{% for hidden in form.hidden_fields %} +{{field}}{% if field.errors %}<div class="invalid-feedback"> + {{ field.errors }} +</div>{% endif %} +{% endfor %} +{% for field in form.visible_fields %} +{% if search and forloop.counter0 == 10 %} +</div> +<p class="text-center"> + <a class="btn btn-secondary btn-sm" data-toggle="collapse" href="#tail-form" + aria-expanded="false" aria-controls="tail-form"> + {% trans "Show / hide advanced search" %}</a> +</p> +<div class="collapse" id="tail-form"> + <div class="card card-body"> + <div class="form-row"> +{% endif %} -{% for field in form %} -{% if not field.is_hidden %} {% if forloop.counter0|divisibleby:2 %} {% if forloop.counter0 %} </div>{% endif %} @@ -29,12 +44,11 @@ </div> {% endif %} </div> -{% else %}{{field}} -{% if field.errors %}<div class="invalid-feedback"> - {{ field.errors }} -</div>{% endif %} -{% endif %} -{% if forloop.counter0.last%} +{% if forloop.last %} +{% if search and forloop.counter0 >= 10 %} + </div> </div> {% endif %} +</div> +{% endif %} {% endfor %} |