summaryrefslogtreecommitdiff
path: root/searx/templates/legacy/preferences.html
blob: 23b3875d21a1cb7fb74ae40cf1947c11c04da46a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
{% extends "legacy/base.html" %}
{% block head %} {% endblock %}
{% block content %}
<div class="row">
    <h2>{{ _('Preferences') }}</h2>

    <form method="post" action="{{ url_for('preferences') }}" id="search_form">
    <fieldset>
        <legend>{{ _('Default categories') }}</legend>
        {% set display_tooltip = false %}
        {% include 'legacy/categories.html' %}
    </fieldset>
    {% if 'language' not in locked_preferences %}
    <fieldset>
        <legend>{{ _('Search language') }}</legend>
        <p>
        <select name='language'>
            <option value="all" {% if current_language == 'all' %}selected="selected"{% endif %}>{{ _('Default language') }}</option>
            {% for lang_id,lang_name,country_name,english_name in language_codes | sort(attribute=1) %}
            <option value="{{ lang_id }}" {% if lang_id == current_language %}selected="selected"{% endif %}>{{ lang_name }} {% if country_name %}({{ country_name }}) {% endif %}- {{ lang_id }}</option>
            {% endfor %}
        </select>
        </p>
    </fieldset>
    {% endif %}
    {% if 'locale' not in locked_preferences %}
    <fieldset>
        <legend>{{ _('Interface language') }}</legend>
        <p>
        <select name='locale'>
            {% for locale_id,locale_name in locales.items() | sort %}
            <option value="{{ locale_id }}" {% if locale_id == current_locale %}selected="selected"{% endif %}>{{ locale_name }}</option>
            {% endfor %}
        </select>
        </p>
    </fieldset>
    {% endif %}
    {% if 'autocomplete' not in locked_preferences %}
    <fieldset>
        <legend>{{ _('Autocomplete') }}</legend>
        <p>
        <select name="autocomplete">
            <option value=""> - </option>
            {% for backend in autocomplete_backends %}
            <option value="{{ backend }}" {% if backend == autocomplete %}selected="selected"{% endif %}>{{ backend }}</option>
            {% endfor %}
        </select>
        </p>
    </fieldset>
    {% endif %}
    {% if 'image_proxy' not in locked_preferences %}
    <fieldset>
        <legend>{{ _('Image proxy') }}</legend>
        <p>
        <select name='image_proxy'>
            <option value="1" {% if image_proxy %}selected="selected"{% endif %}>{{ _('Enabled') }}</option>
            <option value="" {% if not image_proxy %}selected="selected"{% endif %}>{{ _('Disabled') }}</option>
        </select>
        </p>
    </fieldset>
    {% endif %}
    {% if 'method' not in locked_preferences %}
    <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>
    {% endif %}
    {% if 'safesearch' not in locked_preferences %}
    <fieldset>
        <legend>{{ _('SafeSearch') }}</legend>
        <p>
        <select name='safesearch'>
            <option value="2" {% if safesearch == '2' %}selected="selected"{% endif %}>{{ _('Strict') }}</option>
            <option value="1" {% if safesearch == '1' %}selected="selected"{% endif %}>{{ _('Moderate') }}</option>
            <option value="0" {% if safesearch == '0' %}selected="selected"{% endif %}>{{ _('None') }}</option>
        </select>
        </p>
    </fieldset>
    {% endif %}
    {% if 'theme' not in locked_preferences %}
    <fieldset>
        <legend>{{ _('Themes') }}</legend>
        <p>
        <select name="theme">
            {% for name in themes %}
            <option value="{{ name }}" {% if name == theme %}selected="selected"{% endif %}>{{ name }}</option>
            {% endfor %}
        </select>
        </p>
    </fieldset>
    {% endif %}
    {% if 'results_on_new_tab' not in locked_preferences %}
    <fieldset>
        <legend>{{ _('Results on new tabs') }}</legend>
        <p>
            <select name='results_on_new_tab'>
                <option value="1" {% if results_on_new_tab %}selected="selected"{% endif %}>{{ _('On') }}</option>
                <option value="0" {% if not results_on_new_tab %}selected="selected"{% endif %}>{{ _('Off')}}</option>
            </select>
        </p>
    </fieldset>
    {% endif %}
    <fieldset>
    <legend>{{ _('Currently used search engines') }}</legend>

    <table>
        <tr>
            <th>{{ _('Engine name') }}</th>
            <th>{{ _('Shortcut') }}</th>
            <th>{{ _('Category') }}</th>
            <th>{{ _('Allow') }} / {{ _('Block') }}</th>
        </tr>
    {% for categ in all_categories %}
        {% for search_engine in engines_by_category[categ] %}

            {% if not search_engine.private %}
            <tr>
                <td>{{ search_engine.name }}</td>
                <td>{{ shortcuts[search_engine.name] }}</td>
                <td>{{ _(categ) }}</td>
                <td class="engine_checkbox">
                    <input type="checkbox" id="engine_{{ categ|replace(' ', '_') }}_{{ search_engine.name|replace(' ', '_') }}" name="engine_{{ search_engine.name }}__{{ categ }}"{% if (search_engine.name, categ) in disabled_engines %} checked="checked"{% endif %} />
                    <label class="allow" for="engine_{{ categ|replace(' ', '_') }}_{{ search_engine.name|replace(' ', '_') }}">{{ _('Allow') }}</label>
                    <label class="deny" for="engine_{{ categ|replace(' ', '_') }}_{{ search_engine.name|replace(' ', '_') }}">{{ _('Block') }}</label>
                </td>
            </tr>
            {% endif %}
        {% endfor %}
    {% endfor %}
    </table>
    </fieldset>
    <p class="small_font">{{ _('These settings are stored in your cookies, this allows us not to store this data about you.') }}
    <br />
    {{ _("These cookies serve your sole convenience, we don't use these cookies to track you.") }}
    </p>

    <input type="submit" value="{{ _('save') }}" />
    <div class="{% if rtl %}left{% else %}right{% endif %} preferences_back"><a href="{{ url_for('clear_cookies') }}">{{ _('Reset defaults') }}</a></div>
    <div class="{% if rtl %}left{% else %}right{% endif %} preferences_back"><a href="{{ url_for('index') }}">{{ _('back') }}</a></div>
    </form>
</div>
{% endblock %}