From b0fcc865599cfdc87e2ca8a637df8f5b336bb459 Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Thu, 29 Sep 2022 10:43:45 +0200 Subject: [proxy] make uniform use of section labels in the web UI --- .../web_ui/templates/rules/show_single.html.jinja | 36 +++++++++++----------- 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'src/hydrilla/proxy/web_ui/templates/rules/show_single.html.jinja') diff --git a/src/hydrilla/proxy/web_ui/templates/rules/show_single.html.jinja b/src/hydrilla/proxy/web_ui/templates/rules/show_single.html.jinja index 1fda236..9bf2c75 100644 --- a/src/hydrilla/proxy/web_ui/templates/rules/show_single.html.jinja +++ b/src/hydrilla/proxy/web_ui/templates/rules/show_single.html.jinja @@ -28,6 +28,8 @@ code in a proprietary work, I am not going to enforce this in court. {% include 'include/checkbox_tricks_style.css.jinja' %} {% endblock %} +{% import 'import/checkbox_tricks.html.jinja' as tricks %} + {% block main %}

{% if display_info.allow_scripts %} @@ -37,21 +39,15 @@ code in a proprietary work, I am not going to enforce this in court. {% endif %}

+ {{ label(_('web_ui.rules.single.pattern_label')) }} +

- {{ _('web_ui.rules.single.pattern_is_{}').format(display_info.pattern) }} + {{ display_info.pattern }}

- {% if rule_pattern_invalid is defined %} - {% set checked_attr = '' %} - {% else %} - {% set checked_attr = 'checked=""' %} - {% endif %} - - + {% set button_text = _('web_ui.rules.single.update_pattern_button') %} + {% set initial_show = rule_pattern_invalid is defined %} + {{ tricks.sibling_hider(button_text, 'edit_pattern', initial_show) }}
@@ -65,19 +61,21 @@ code in a proprietary work, I am not going to enforce this in court.
- -
-
+ {{ label(_('web_ui.rules.single.block_or_allow_label')) }} + {% set allow_but_classes = ['red-button'] %} {% set block_but_classes = ['blue-button'] %} @@ -100,6 +98,8 @@ code in a proprietary work, I am not going to enforce this in court.
+ {{ label(_('web_ui.rules.single.actions_label')) }} + {% set button_text = _('web_ui.rules.single.remove_button') %} {% set extra_fields = {'action': 'remove_rule'} %} {{ button_row([(['green-button'], button_text, extra_fields)]) }} -- cgit v1.2.3