summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Tauber <asciimoo@gmail.com>2015-03-10 23:03:06 +0100
committerAdam Tauber <asciimoo@gmail.com>2015-03-10 23:03:06 +0100
commit359dfc5ebb011f8c241fbfa16ec34fcbec844064 (patch)
treeb185f49c7dfe1bf63bb9dd3353d58192ebc62b41
parent88aee611f7c016d1f05202af9d9f647c8e5d26e2 (diff)
downloadsearxng-359dfc5ebb011f8c241fbfa16ec34fcbec844064.tar.gz
searxng-359dfc5ebb011f8c241fbfa16ec34fcbec844064.zip
[mod] checkbox macro
-rw-r--r--searx/templates/oscar/macros.html8
1 files changed, 8 insertions, 0 deletions
diff --git a/searx/templates/oscar/macros.html b/searx/templates/oscar/macros.html
index 1ba1617a9..feb9ba942 100644
--- a/searx/templates/oscar/macros.html
+++ b/searx/templates/oscar/macros.html
@@ -59,3 +59,11 @@
</div>
{% endif %}
{%- endmacro %}
+
+{% macro checkbox_toggle(id, blocked) -%}
+ <div class="checkbox">
+ <input class="hidden" type="checkbox" id="{{ id }}" name="{{ id }}"{% if blocked %} checked="checked"{% endif %} />
+ <label class="btn btn-success label_hide_if_checked" for="{{ id }}">{{ _('Block') }}</label>
+ <label class="btn btn-danger label_hide_if_not_checked" for="{{ id }}">{{ _('Allow') }}</label>
+ </div>
+{%- endmacro %}