persist the advanced dropdown
This commit is contained in:
Родитель
b7b2eee131
Коммит
300c621bb8
|
@ -107,6 +107,8 @@ def SearchForm(request):
|
|||
pp = forms.ChoiceField(label=_('Per Page'),
|
||||
choices=zip(per_page, per_page))
|
||||
|
||||
advanced = forms.BooleanField(widget=forms.HiddenInput)
|
||||
|
||||
# Attach these to the form for usage in the template.
|
||||
app_versions = get_app_versions()
|
||||
top_level_cat = dict(top_level)
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit dead4d5d3a643fe2d309e6208c32c19f81799b61
|
||||
Subproject commit 02e6732ac3f8f21dd0d63537ccd974998438fa74
|
2
media/js
2
media/js
|
@ -1 +1 @@
|
|||
Subproject commit dd99d37cd6576678d43a19609b628a71622b7748
|
||||
Subproject commit a96c61634840129419255dc24a82d753dac3ab6d
|
|
@ -1,4 +1,5 @@
|
|||
<div class="search-form expanded-search-form">
|
||||
{% set show_advanced = search_form.advanced.data == 'on' %}
|
||||
<div class="search-form expanded-search-form {% if show_advanced %}expanded{% endif %}">
|
||||
<form method="get" id="search-form" action="{{ url('search.search') }}">
|
||||
<div class="basic" id="search-query">
|
||||
<input id="query" type="text" title="search" name="q"
|
||||
|
@ -23,7 +24,7 @@
|
|||
</button>
|
||||
</div> {# search-query #}
|
||||
<div id="advanced-link" title="{{ _('Toggle advanced search mode') }}">
|
||||
<a class="asopen" href="#search-form">{{ _('Advanced') }}</a>
|
||||
<a class="asopen" href="?advanced=on">{{ _('Advanced') }}</a>
|
||||
</div>
|
||||
<div id="advanced-search" class="advanced">
|
||||
<fieldset class="important">
|
||||
|
@ -60,6 +61,7 @@
|
|||
</fieldset>
|
||||
<span id="search-data"
|
||||
data-appversions="{{ search_form.app_versions|json }}"></span>
|
||||
{{ search_form.advanced|safe }}
|
||||
</div> {# advanced-search #}
|
||||
</form>
|
||||
</div>
|
||||
|
|
Загрузка…
Ссылка в новой задаче