summaryrefslogtreecommitdiff
path: root/searx/templates/simple/macros.html
diff options
context:
space:
mode:
authorAlexandre Flament <alex@al-f.net>2022-02-25 15:46:18 +0100
committerAlexandre FLAMENT <alexandre.flament@hesge.ch>2022-03-02 18:56:08 +0000
commit3d9e48b84e4d41c7ee5042ad718108bd49bdc07a (patch)
tree7fada58d7decc3997d30be9e369be74eeb4feac6 /searx/templates/simple/macros.html
parent0ddcc12474d86aa012a53ead06edb8dc0413e8ec (diff)
downloadsearxng-3d9e48b84e4d41c7ee5042ad718108bd49bdc07a.tar.gz
searxng-3d9e48b84e4d41c7ee5042ad718108bd49bdc07a.zip
[simple] checkboxes can get the focusable
Do note that checkboxes in the engine tab are displayed reversed. See: https://github.com/searxng/searxng/blob/3408d061aab9abc6168fec9bbc6deab71b236dac/searx/templates/simple/preferences.html#L313 A checkbox for an engine is checked when the engine is disabled.
Diffstat (limited to 'searx/templates/simple/macros.html')
-rw-r--r--searx/templates/simple/macros.html20
1 files changed, 7 insertions, 13 deletions
diff --git a/searx/templates/simple/macros.html b/searx/templates/simple/macros.html
index 6c64c23ea..a751ce187 100644
--- a/searx/templates/simple/macros.html
+++ b/searx/templates/simple/macros.html
@@ -72,19 +72,13 @@
{%- endmacro -%}
{%- macro checkbox_onoff(name, checked) -%}
-<div class="checkbox-onoff">{{- '' -}}
- <input type="checkbox" value="None" id="{{ name }}" name="{{ name }}" {% if checked %}checked{% endif %}/>{{- '' -}}
- <label for="{{ name }}"></label>{{- '' -}}
-</div>
+ <input type="checkbox" name="{{ name }}" id="{{ name }}" value="None" class="checkbox-onoff" {% if checked %}checked{% endif %} />
{%- endmacro -%}
-{%- macro checkbox(name, checked, readonly, disabled) -%}
-<div class="checkbox">{{- '' -}}
- {%- if checked == '?' -%}
- {{ icon_small('warning') }}
- {%- else -%}
- <input type="checkbox" value="None" id="{{ name }}" name="{{ name }}" {% if checked %}checked{% endif %}{% if readonly %} readonly="readonly" {% endif %}{% if disabled %} disabled="disabled" {% endif %}/>{{- '' -}}
- <label for="{{ name }}"></label>{{- '' -}}
- {%- endif -%}
-</div>
+{%- macro checkbox(name, checked, disabled) -%}
+{%- if checked == '?' -%}
+ {{- icon_small('warning') -}}
+{%- else -%}
+ <input type="checkbox"{% if name %} name="{{ name }}"{% endif %} value="None"{% if checked %} checked{% endif %}{% if disabled %} disabled{% endif %} />
+{%- endif -%}
{%- endmacro -%}