mirror of
https://github.com/searxng/searxng.git
synced 2024-11-22 12:10:11 +01:00
advanced-search: panel is visible when checked before
This commit is contained in:
parent
128b5245ab
commit
16a8641649
@ -139,6 +139,7 @@ class Search(object):
|
||||
self.pageno = 1
|
||||
self.lang = 'all'
|
||||
self.time_range = None
|
||||
self.is_advanced = None
|
||||
|
||||
# set blocked engines
|
||||
self.disabled_engines = request.preferences.engines.get_disabled()
|
||||
@ -180,6 +181,7 @@ class Search(object):
|
||||
self.lang = query_obj.languages[-1]
|
||||
|
||||
self.time_range = self.request_data.get('time_range')
|
||||
self.is_advanced = self.request_data.get('advanced_search')
|
||||
|
||||
self.engines = query_obj.engines
|
||||
|
||||
@ -298,6 +300,7 @@ class Search(object):
|
||||
# 0 = None, 1 = Moderate, 2 = Strict
|
||||
request_params['safesearch'] = request.preferences.get_value('safesearch')
|
||||
request_params['time_range'] = self.time_range
|
||||
request_params['advanced_search'] = self.is_advanced
|
||||
|
||||
# update request parameters dependent on
|
||||
# search-engine (contained in engines folder)
|
||||
|
@ -1,5 +1,5 @@
|
||||
<div class="input-group col-sm-12 advanced">
|
||||
<input type="checkbox" id="check-advanced">
|
||||
<input type="checkbox" name="advanced_search" id="check-advanced" {% if advanced_search %} checked="checked"{% endif %}>
|
||||
<label for="check-advanced">
|
||||
<span class="glyphicon glyphicon-cog"></span>
|
||||
{{ _('Advanced settings') }}
|
||||
|
@ -459,6 +459,7 @@ def index():
|
||||
paging=search.paging,
|
||||
number_of_results=format_decimal(number_of_results),
|
||||
pageno=search.pageno,
|
||||
advanced_search=search.is_advanced,
|
||||
time_range=search.time_range,
|
||||
base_url=get_base_url(),
|
||||
suggestions=search.result_container.suggestions,
|
||||
|
Loading…
Reference in New Issue
Block a user