[enh] add ability to send engine data to subsequent requests
This commit is contained in:
@@ -1,5 +1,12 @@
|
||||
{% extends "simple/base.html" %}
|
||||
{% from 'simple/macros.html' import icon, icon_small %}
|
||||
{% macro engine_data_form(engine_data) -%}
|
||||
{% for engine_name, kv_data in engine_data.items() %}
|
||||
{% for k, v in kv_data.items() %}
|
||||
<input type="hidden" name="engine_data-{{ engine_name }}-{{ k|e }}" value="{{ v|e }}" />
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
{%- endmacro %}
|
||||
{% block title %}{% if method == 'GET' %}{{- q|e -}} -{% endif %}{% endblock %}
|
||||
{% block meta %}<link rel="alternate" type="application/rss+xml" title="Searx search: {{ q|e }}" href="{{ url_for('search', _external=True) }}?q={{ q|urlencode }}&categories={{ selected_categories|join(",") | replace(' ','+') }}&pageno={{ pageno }}&time_range={{ time_range }}&language={{ current_language }}&safesearch={{ safesearch }}&format=rss">{% endblock %}
|
||||
{% block content %}
|
||||
@@ -136,6 +143,7 @@
|
||||
<form method="{{ method or 'POST' }}" action="{{ url_for('search') }}">
|
||||
<div class="{% if rtl %}right{% else %}left{% endif %}">
|
||||
<input type="hidden" name="q" value="{{ q|e }}" >
|
||||
{{- engine_data_form(engine_data) -}}
|
||||
{% for category in selected_categories %}
|
||||
<input type="hidden" name="category_{{ category }}" value="1" >
|
||||
{% endfor %}
|
||||
@@ -152,6 +160,7 @@
|
||||
<form method="{{ method or 'POST' }}" action="{{ url_for('search') }}">
|
||||
<div class="{% if rtl %}left{% else %}right{% endif %}">
|
||||
<input type="hidden" name="q" value="{{ q|e }}" >
|
||||
{{- engine_data_form(engine_data) -}}
|
||||
{% for category in selected_categories %}
|
||||
<input type="hidden" name="category_{{ category }}" value="1" >
|
||||
{% endfor %}
|
||||
|
||||
Reference in New Issue
Block a user