diff --git a/scipost_django/scipost/templates/scipost/header.html b/scipost_django/scipost/templates/scipost/header.html index bf4a9749c144c46a191875e19555bbf28109656c..75427c9ceda1da0719fee9a2106eccc9ef44ffef 100644 --- a/scipost_django/scipost/templates/scipost/header.html +++ b/scipost_django/scipost/templates/scipost/header.html @@ -12,7 +12,7 @@ <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 not request.get_full_path == '/' %}load, {% endif %}change" + hx-trigger="{% if load_header_forms %}load, {% endif %}change" hx-swap="outerHTML" > {% crispy session_acad_field_form %} @@ -20,7 +20,7 @@ </div> <div class="mx-2 my-4 my-lg-auto" hx-get="{% url 'ontology:_hx_session_specialty_form' %}" - hx-trigger="{% if not request.get_full_path == '/' %}load, {% endif %}hide.bs.tab from:#home-tab, session-acad-field-set from:body" + hx-trigger="{% if load_header_forms %}load, {% endif %}hide.bs.tab from:#home-tab, session-acad-field-set from:body" > </div> diff --git a/scipost_django/scipost/views.py b/scipost_django/scipost/views.py index e0beb6c324f96a7fa0b81ffdaac2328b6f3f70bb..a6c0789336055dc915df07fc9f2e96d87e0ce196 100644 --- a/scipost_django/scipost/views.py +++ b/scipost_django/scipost/views.py @@ -171,6 +171,7 @@ def index(request): 'news_items': NewsItem.objects.homepage().order_by('-date')[:3], 'publications': Publication.objects.published().order_by('-publication_date', '-paper_nr')[:3], + 'load_header_forms': request.GET.get('tab', None) != None } return render(request, 'scipost/portal/portal.html', context)