aboutsummaryrefslogtreecommitdiff
path: root/src/hydrilla/proxy/web_ui/templates/import/checkbox_tricks.html.jinja
diff options
context:
space:
mode:
authorWojtek Kosior <koszko@koszko.org>2022-10-22 11:19:14 +0200
committerWojtek Kosior <koszko@koszko.org>2022-10-22 13:22:40 +0200
commit1fc2dbe5a3e867eb5e6c2f759409f1c94146a794 (patch)
tree73e9b90b26fb30e115ae111bb7592fdb92615cd3 /src/hydrilla/proxy/web_ui/templates/import/checkbox_tricks.html.jinja
parentfe43bd552aaacd649b0e00afada01d07ad8dae9a (diff)
downloadhaketilo-hydrilla-1fc2dbe5a3e867eb5e6c2f759409f1c94146a794.tar.gz
haketilo-hydrilla-1fc2dbe5a3e867eb5e6c2f759409f1c94146a794.zip
[proxy] make popup script injection configurable throught the web UI
Diffstat (limited to 'src/hydrilla/proxy/web_ui/templates/import/checkbox_tricks.html.jinja')
-rw-r--r--src/hydrilla/proxy/web_ui/templates/import/checkbox_tricks.html.jinja9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/hydrilla/proxy/web_ui/templates/import/checkbox_tricks.html.jinja b/src/hydrilla/proxy/web_ui/templates/import/checkbox_tricks.html.jinja
index 999208b..4ad9ca1 100644
--- a/src/hydrilla/proxy/web_ui/templates/import/checkbox_tricks.html.jinja
+++ b/src/hydrilla/proxy/web_ui/templates/import/checkbox_tricks.html.jinja
@@ -23,7 +23,7 @@ code in a proprietary work, I am not going to enforce this in court.
{{ name }}_chbx
{%- endmacro %}
-{% macro sibling_hider(button_text, name, initial_show=false) %}
+{% macro sibling_hider_but(button_text, name, initial_show=false) %}
{% set attrs = {'type': 'checkbox', 'class': 'chbx-tricks-show-hide'} %}
{% do attrs.update({'id': hider_id(name)}) %}
{% do attrs.update({'checked': none if initial_show else ''}) %}
@@ -33,3 +33,10 @@ code in a proprietary work, I am not going to enforce this in court.
{{ button_text }}
</label>
{% endmacro %}
+
+{% macro sibling_hider_radio(name, radio_id, initial_show=false) %}
+ {% set attrs = {'type': 'radio', 'class': 'chbx-tricks-show'} %}
+ {% do attrs.update({'name': name, 'id': radio_id}) %}
+ {% do attrs.update({'checked': '' if initial_show else none}) %}
+ <input {{ attrs|xmlattr }}>
+{% endmacro %}