mirror of
https://github.com/searx/searx
synced 2024-12-12 08:46:26 +01:00
Merge pull request #2760 from return42/fix-preference-save
[fix] redirect when saving preferences
This commit is contained in:
commit
28b3975aa8
@ -368,7 +368,7 @@
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div class="tab-pane">
|
<div class="tab-pane">
|
||||||
<input readonly="" class="form-control select-all-on-click cursor-text" type="url" value="{{ base_url }}?preferences={{ preferences_url_params|e }}{% raw %}&q=%s{% endraw %}">
|
<input readonly="" class="form-control select-all-on-click cursor-text" type="url" value="{{ url_for('index', _external=True) }}?preferences={{ preferences_url_params|e }}{% raw %}&q=%s{% endraw %}">
|
||||||
<input type="submit" class="btn btn-primary" value="{{ _('save') }}" />
|
<input type="submit" class="btn btn-primary" value="{{ _('save') }}" />
|
||||||
<a href="{{ url_for('index') }}"><div class="btn btn-default">{{ _('back') }}</div></a>
|
<a href="{{ url_for('index') }}"><div class="btn btn-default">{{ _('back') }}</div></a>
|
||||||
<a href="{{ url_for('clear_cookies') }}"><div class="btn btn-default">{{ _('Reset defaults') }}</div></a>
|
<a href="{{ url_for('clear_cookies') }}"><div class="btn btn-default">{{ _('Reset defaults') }}</div></a>
|
||||||
|
@ -813,7 +813,7 @@ def preferences():
|
|||||||
|
|
||||||
# save preferences
|
# save preferences
|
||||||
if request.method == 'POST':
|
if request.method == 'POST':
|
||||||
resp = make_response(url_for('index', _external=True))
|
resp = make_response(redirect(url_for('index', _external=True)))
|
||||||
try:
|
try:
|
||||||
request.preferences.parse_form(request.form)
|
request.preferences.parse_form(request.form)
|
||||||
except ValidationException:
|
except ValidationException:
|
||||||
|
Loading…
Reference in New Issue
Block a user