forked from zaclys/searxng
Merge pull request #989 from return42/fix-945
[fix] simple theme: open preferences with general tab
This commit is contained in:
commit
be8d2f4949
|
@ -55,8 +55,8 @@
|
||||||
<div class="tabs" role="tablist">
|
<div class="tabs" role="tablist">
|
||||||
{%- endmacro -%}
|
{%- endmacro -%}
|
||||||
|
|
||||||
{%- macro tab_header(name, id, label) -%}
|
{%- macro tab_header(name, id, label, checked) -%}
|
||||||
<input type="radio" name="{{ name }}" id="tab-{{ id }}"/>
|
<input type="radio" name="{{ name }}" id="tab-{{ id }}" {% if checked is sameas true %}checked="checked"{% endif %} />
|
||||||
<label id="tab-label-{{ label }}" for="tab-{{ id }}" role="tab" aria-controls="tab-content-{{ id }}">{{ label }}</label>
|
<label id="tab-label-{{ label }}" for="tab-{{ id }}" role="tab" aria-controls="tab-content-{{ id }}">{{ label }}</label>
|
||||||
<section id="tab-content-{{ id }}" role="tabpanel" aria-labelledby="tab-label-{{ label }}" aria-hidden="false">
|
<section id="tab-content-{{ id }}" role="tabpanel" aria-labelledby="tab-label-{{ label }}" aria-hidden="false">
|
||||||
{%- endmacro -%}
|
{%- endmacro -%}
|
||||||
|
|
|
@ -102,7 +102,7 @@
|
||||||
|
|
||||||
{{ tabs_open() }}
|
{{ tabs_open() }}
|
||||||
|
|
||||||
{{ tab_header('maintab', 'general', _('General')) }}
|
{{ tab_header('maintab', 'general', _('General'), True) }}
|
||||||
{% if 'categories' not in locked_preferences %}
|
{% if 'categories' not in locked_preferences %}
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend>{{ _('Default categories') }}</legend>
|
<legend>{{ _('Default categories') }}</legend>
|
||||||
|
@ -284,8 +284,10 @@
|
||||||
{{ tab_header('maintab', 'engines', _('Engines')) }}
|
{{ tab_header('maintab', 'engines', _('Engines')) }}
|
||||||
<p>{{ _('Currently used search engines') }}</p>
|
<p>{{ _('Currently used search engines') }}</p>
|
||||||
{{ tabs_open() }}
|
{{ tabs_open() }}
|
||||||
|
{% set ns = namespace(checked=true) %}
|
||||||
{% for categ in categories_as_tabs + [OTHER_CATEGORY] %}
|
{% for categ in categories_as_tabs + [OTHER_CATEGORY] %}
|
||||||
{{ tab_header('enginetab', 'category' + categ, _(categ)) }}
|
{{ tab_header('enginetab', 'category' + categ, _(categ), ns.checked )}}
|
||||||
|
{% set ns.checked = false %}
|
||||||
{% if categ == OTHER_CATEGORY %}
|
{% if categ == OTHER_CATEGORY %}
|
||||||
<p>{{_('This tab does not show up for search results, but you can search the engines listed here via bangs.')}}</p>
|
<p>{{_('This tab does not show up for search results, but you can search the engines listed here via bangs.')}}</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
Loading…
Reference in New Issue