mirror of
https://github.com/searxng/searxng
synced 2024-01-01 19:24:07 +01:00

The search tabs are actually labels for checkboxes because multiple can be selected. To still make them work like tabs the plugin search_on_category_select adds a JavaScript that submits the form on label click. The problem with this is that when the plugin is disabled (e.g. because JavaScript is disabled or a user chose to disable it in the settings), then the tabs still look like tabs but act as checkboxes (which is very confusing). This commit changes fixes this so that the checkboxes are visible by default. The next commit makes the plugin hide them again. This way they are visible when the plugin is disabled ... as they should be.
8 lines
456 B
HTML
8 lines
456 B
HTML
<div id="categories">
|
|
{% for category in ((categories_as_tabs | reverse) if rtl else categories_as_tabs) -%}
|
|
<div class="category">
|
|
<input type="checkbox" id="checkbox_{{ category|replace(' ', '_') }}" name="category_{{ category }}" {% if category in selected_categories %}checked="checked"{% endif %} />{{- '' -}}
|
|
<label for="checkbox_{{ category|replace(' ', '_') }}">{{ _(category) }}</label>
|
|
</div>
|
|
{%- endfor %}
|
|
</div>
|