preferences.html 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. {% extends "legacy/base.html" %}
  2. {% block head %} {% endblock %}
  3. {% block content %}
  4. <div class="row">
  5. <h2>{{ _('Preferences') }}</h2>
  6. <form method="post" action="{{ url_for('preferences') }}" id="search_form">
  7. <fieldset>
  8. <legend>{{ _('Default categories') }}</legend>
  9. {% set display_tooltip = false %}
  10. {% include 'legacy/categories.html' %}
  11. </fieldset>
  12. <fieldset>
  13. <legend>{{ _('Search language') }}</legend>
  14. <p>
  15. <select name='language'>
  16. <option value="all" {% if current_language == 'all' %}selected="selected"{% endif %}>{{ _('Default language') }}</option>
  17. {% for lang_id,lang_name,country_name,english_name in language_codes | sort(attribute=1) %}
  18. <option value="{{ lang_id }}" {% if lang_id == current_language %}selected="selected"{% endif %}>{{ lang_name }} {% if country_name %}({{ country_name }}) {% endif %}- {{ lang_id }}</option>
  19. {% endfor %}
  20. </select>
  21. </p>
  22. </fieldset>
  23. <fieldset>
  24. <legend>{{ _('Interface language') }}</legend>
  25. <p>
  26. <select name='locale'>
  27. {% for locale_id,locale_name in locales.items() | sort %}
  28. <option value="{{ locale_id }}" {% if locale_id == current_locale %}selected="selected"{% endif %}>{{ locale_name }}</option>
  29. {% endfor %}
  30. </select>
  31. </p>
  32. </fieldset>
  33. <fieldset>
  34. <legend>{{ _('Autocomplete') }}</legend>
  35. <p>
  36. <select name="autocomplete">
  37. <option value=""> - </option>
  38. {% for backend in autocomplete_backends %}
  39. <option value="{{ backend }}" {% if backend == autocomplete %}selected="selected"{% endif %}>{{ backend }}</option>
  40. {% endfor %}
  41. </select>
  42. </p>
  43. </fieldset>
  44. <fieldset>
  45. <legend>{{ _('Image proxy') }}</legend>
  46. <p>
  47. <select name='image_proxy'>
  48. <option value="1" {% if image_proxy %}selected="selected"{% endif %}>{{ _('Enabled') }}</option>
  49. <option value="" {% if not image_proxy %}selected="selected"{% endif %}>{{ _('Disabled') }}</option>
  50. </select>
  51. </p>
  52. </fieldset>
  53. <fieldset>
  54. <legend>{{ _('Method') }}</legend>
  55. <p>
  56. <select name='method'>
  57. <option value="POST" {% if method == 'POST' %}selected="selected"{% endif %}>POST</option>
  58. <option value="GET" {% if method == 'GET' %}selected="selected"{% endif %}>GET</option>
  59. </select>
  60. </p>
  61. </fieldset>
  62. <fieldset>
  63. <legend>{{ _('SafeSearch') }}</legend>
  64. <p>
  65. <select name='safesearch'>
  66. <option value="2" {% if safesearch == '2' %}selected="selected"{% endif %}>{{ _('Strict') }}</option>
  67. <option value="1" {% if safesearch == '1' %}selected="selected"{% endif %}>{{ _('Moderate') }}</option>
  68. <option value="0" {% if safesearch == '0' %}selected="selected"{% endif %}>{{ _('None') }}</option>
  69. </select>
  70. </p>
  71. </fieldset>
  72. <fieldset>
  73. <legend>{{ _('Themes') }}</legend>
  74. <p>
  75. <select name="theme">
  76. {% for name in themes %}
  77. <option value="{{ name }}" {% if name == theme %}selected="selected"{% endif %}>{{ name }}</option>
  78. {% endfor %}
  79. </select>
  80. </p>
  81. </fieldset>
  82. <fieldset>
  83. <legend>{{ _('Results on new tabs') }}</legend>
  84. <p>
  85. <select name='results_on_new_tab'>
  86. <option value="1" {% if results_on_new_tab %}selected="selected"{% endif %}>{{ _('On') }}</option>
  87. <option value="0" {% if not results_on_new_tab %}selected="selected"{% endif %}>{{ _('Off')}}</option>
  88. </select>
  89. </p>
  90. </fieldset>
  91. <fieldset>
  92. <legend>{{ _('Currently used search engines') }}</legend>
  93. <table>
  94. <tr>
  95. <th>{{ _('Engine name') }}</th>
  96. <th>{{ _('Category') }}</th>
  97. <th>{{ _('Allow') }} / {{ _('Block') }}</th>
  98. </tr>
  99. {% for categ in all_categories %}
  100. {% for search_engine in engines_by_category[categ] %}
  101. {% if not search_engine.private %}
  102. <tr>
  103. <td>{{ search_engine.name }} ({{ shortcuts[search_engine.name] }})&lrm;</td>
  104. <td>{{ _(categ) }}</td>
  105. <td class="engine_checkbox">
  106. <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 %} />
  107. <label class="allow" for="engine_{{ categ|replace(' ', '_') }}_{{ search_engine.name|replace(' ', '_') }}">{{ _('Allow') }}</label>
  108. <label class="deny" for="engine_{{ categ|replace(' ', '_') }}_{{ search_engine.name|replace(' ', '_') }}">{{ _('Block') }}</label>
  109. </td>
  110. </tr>
  111. {% endif %}
  112. {% endfor %}
  113. {% endfor %}
  114. </table>
  115. </fieldset>
  116. <p class="small_font">{{ _('These settings are stored in your cookies, this allows us not to store this data about you.') }}
  117. <br />
  118. {{ _("These cookies serve your sole convenience, we don't use these cookies to track you.") }}
  119. </p>
  120. <input type="submit" value="{{ _('save') }}" />
  121. <div class="{% if rtl %}left{% else %}right{% endif %} preferences_back"><a href="{{ url_for('clear_cookies') }}">{{ _('Reset defaults') }}</a></div>
  122. <div class="{% if rtl %}left{% else %}right{% endif %} preferences_back"><a href="{{ url_for('index') }}">{{ _('back') }}</a></div>
  123. </form>
  124. </div>
  125. {% endblock %}