diff --git a/scipost_django/scipost/templates/scipost/header.html b/scipost_django/scipost/templates/scipost/header.html index 75427c9ceda1da0719fee9a2106eccc9ef44ffef..25e8b1c3b776bb4a6adccde33bfd77dc5aac1282 100644 --- a/scipost_django/scipost/templates/scipost/header.html +++ b/scipost_django/scipost/templates/scipost/header.html @@ -9,20 +9,22 @@ <a href="{% url 'scipost:index' %}"><img src="{% static 'scipost/images/logo_scipost_RGB_HTML_groot.png' %}" class="m-0 p-0" alt="SciPost logo" style="max-width: unset;" width="180" /></a> </div> - <div class="mx-2 my-4 my-lg-auto"> - <form id="session_acad_field_form" style="display: none;" - hx-get="{% url 'ontology:set_session_acad_field' %}" - hx-trigger="{% if load_header_forms %}load, {% endif %}change" - hx-swap="outerHTML" + {% if session_acad_field_form %} + <div class="mx-2 my-4 my-lg-auto"> + <form id="session_acad_field_form" style="display: none;" + hx-get="{% url 'ontology:set_session_acad_field' %}" + hx-trigger="{% if load_header_forms %}load, {% endif %}change" + hx-swap="outerHTML" + > + {% crispy session_acad_field_form %} + </form> + </div> + <div class="mx-2 my-4 my-lg-auto" + hx-get="{% url 'ontology:_hx_session_specialty_form' %}" + hx-trigger="{% if load_header_forms %}load, {% endif %}hide.bs.tab from:#home-tab, session-acad-field-set from:body" > - {% crispy session_acad_field_form %} - </form> - </div> - <div class="mx-2 my-4 my-lg-auto" - hx-get="{% url 'ontology:_hx_session_specialty_form' %}" - hx-trigger="{% if load_header_forms %}load, {% endif %}hide.bs.tab from:#home-tab, session-acad-field-set from:body" - > - </div> + </div> + {% endif %} <div class="mt-4 my-lg-auto ms-2"> <form id="header-search-form" method="get" action="{% url 'scipost:search' %}">