1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Merge branch 'develop' into feature

This commit is contained in:
jeremystretch
2022-03-18 13:34:31 -04:00
4 changed files with 9 additions and 5 deletions

View File

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

View File

@@ -5,7 +5,7 @@
aria-label="Search"
placeholder="Search"
class="form-control"
value="{{ request.GET.q }}"
value="{{ request.GET.q|escape }}"
/>
<input name="obj_type" hidden type="text" class="search-obj-type" />

View File

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