Focus on searchbar #7839

This commit is contained in:
Pieter Lambrecht 2022-03-16 00:07:22 +01:00
parent 1add5accf2
commit 9536561aa8
2 changed files with 7 additions and 4 deletions

View File

@ -33,7 +33,7 @@
</button> </button>
</div> </div>
<div class="d-flex my-1 flex-grow-1 justify-content-center w-100"> <div class="d-flex my-1 flex-grow-1 justify-content-center w-100">
{% search_options %} {% search_options request %}
</div> </div>
</div> </div>
@ -45,7 +45,7 @@
{# Search bar #} {# Search bar #}
<div class="col-6 d-flex flex-grow-1 justify-content-center"> <div class="col-6 d-flex flex-grow-1 justify-content-center">
{% search_options %} {% search_options request %}
</div> </div>
{# Proflie/login button #} {# Proflie/login button #}

View File

@ -8,6 +8,9 @@ search_form = SearchForm()
@register.inclusion_tag("search/searchbar.html") @register.inclusion_tag("search/searchbar.html")
def search_options() -> Dict: def search_options(request) -> Dict:
"""Provide search options to template.""" """Provide search options to template."""
return {"options": search_form.options} return {
'options': search_form.options,
'request': request,
}