summaryrefslogtreecommitdiff
path: root/searx/templates
diff options
context:
space:
mode:
authorAdam Tauber <asciimoo@gmail.com>2014-04-08 17:51:30 +0200
committerAdam Tauber <asciimoo@gmail.com>2014-04-08 17:51:30 +0200
commit44d3af9fb2482cd0df1a8ababbe2fdf27ab33172 (patch)
tree72c4a2e7e18ab9db63e5ab221b2377f90ff56389 /searx/templates
parentd2f89f044624d21027741ada796580bbcea70922 (diff)
parent4519de9a3a3e9421d8c6b40804c49017de1bc341 (diff)
Merge pull request #61 from matejc/optional_search_get
Optional search get
Diffstat (limited to 'searx/templates')
-rw-r--r--searx/templates/preferences.html9
-rw-r--r--searx/templates/results.html8
-rw-r--r--searx/templates/search.html2
3 files changed, 14 insertions, 5 deletions
diff --git a/searx/templates/preferences.html b/searx/templates/preferences.html
index 582305a1b..eeb86577f 100644
--- a/searx/templates/preferences.html
+++ b/searx/templates/preferences.html
@@ -44,6 +44,15 @@
</p>
</fieldset>
<fieldset>
+ <legend>{{ _('Method') }}</legend>
+ <p>
+ <select name='method'>
+ <option value="POST" {% if method == 'POST' %}selected="selected"{% endif %}>POST</option>
+ <option value="GET" {% if method == 'GET' %}selected="selected"{% endif %}>GET</option>
+ </select>
+ </p>
+ </fieldset>
+ <fieldset>
<legend>{{ _('Currently used search engines') }}</legend>
<table>
diff --git a/searx/templates/results.html b/searx/templates/results.html
index 8094e96b6..97c2696c8 100644
--- a/searx/templates/results.html
+++ b/searx/templates/results.html
@@ -10,7 +10,7 @@
{% if suggestions %}
<div id="suggestions"><span>{{ _('Suggestions') }}</span>
{% for suggestion in suggestions %}
- <form method="post" action="{{ url_for('index') }}">
+ <form method="{{ method or 'POST' }}" action="{{ url_for('index') }}">
<input type="hidden" name="q" value="{{ suggestion }}">
<input type="submit" value="{{ suggestion }}" />
</form>
@@ -25,7 +25,7 @@
<div id="apis">
{{ _('Download results') }}
{% for output_type in ('csv', 'json', 'rss') %}
- <form method="post" action="{{ url_for('index') }}">
+ <form method="{{ method or 'POST' }}" action="{{ url_for('index') }}">
<div class="left">
<input type="hidden" name="q" value="{{ q }}" />
<input type="hidden" name="format" value="{{ output_type }}" />
@@ -52,7 +52,7 @@
{% if paging %}
<div id="pagination">
{% if pageno > 1 %}
- <form method="post" action="{{ url_for('index') }}">
+ <form method="{{ method or 'POST' }}" action="{{ url_for('index') }}">
<div class="left">
<input type="hidden" name="q" value="{{ q }}" />
{% for category in selected_categories %}
@@ -63,7 +63,7 @@
</div>
</form>
{% endif %}
- <form method="post" action="{{ url_for('index') }}">
+ <form method="{{ method or 'POST' }}" action="{{ url_for('index') }}">
<div class="left">
{% for category in selected_categories %}
<input type="hidden" name="category_{{ category }}" value="1"/>
diff --git a/searx/templates/search.html b/searx/templates/search.html
index 95e312e5a..30d1568cf 100644
--- a/searx/templates/search.html
+++ b/searx/templates/search.html
@@ -1,4 +1,4 @@
-<form method="post" action="{{ url_for('index') }}" id="search_form">
+<form method="{{ method or 'POST' }}" action="{{ url_for('index') }}" id="search_form">
<div id="search_wrapper">
<input type="text" placeholder="{{ _('Search for...') }}" id="q" class="q" name="q" tabindex="1" autocomplete="off" {% if q %}value="{{ q }}"{% endif %}/>
<input type="submit" value="search" id="search_submit" />