forked from zaclys/searxng
[mod] template preferences: split into elements (no functional change)
HINT: this patch has no functional change / it is the preparation for following
changes and bugfixes
Over the years, the preferences template became an unmanageable beast. To make
the source code more readable the monolith is splitted into elements. The
splitting into elements also has the advantage that a new template can make use
of them.
The reversed checkbox is a quirk that is only used in the prefereces and must be
eliminated in the long term. For this the macro 'checkbox_onoff_reversed' was
added to the preferences.html template. The 'checkbox' macro is also a quirk of
the preferences.html we don't want to use in other templates (it is an
input-checkbox in a HTML form that was misused for status display).
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
parent
d289a8b225
commit
2149e88bdd
22 changed files with 623 additions and 431 deletions
16
searx/templates/simple/preferences/method.html
Normal file
16
searx/templates/simple/preferences/method.html
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<fieldset>{{- '' -}}
|
||||
<legend id="pref_method">{{- _('HTTP Method') -}}</legend>{{- '' -}}
|
||||
<div class="value">{{- '' -}}
|
||||
<select name='method' aria-labelledby="pref_method">{{- '' -}}
|
||||
<option value="POST"
|
||||
{%- if method == 'POST' %} selected="selected"{%- endif -%}>POST{{- '' -}}
|
||||
</option>{{- '' -}}
|
||||
<option value="GET"
|
||||
{%- if method == 'GET' %} selected="selected"{%- endif -%}>GET{{- '' -}}
|
||||
</option>{{- '' -}}
|
||||
</select>{{- '' -}}
|
||||
</div>{{- '' -}}
|
||||
<div class="description">
|
||||
{{- _('Change how forms are submitted, <a href="http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Request_methods" rel="external">learn more about request methods</a>') -}}
|
||||
</div>{{- '' -}}
|
||||
</fieldset>{{- '' -}}
|
||||
Loading…
Add table
Add a link
Reference in a new issue