aboutsummaryrefslogtreecommitdiff
path: root/src/hydrilla/proxy/web_ui/templates/rules/show_single.html.jinja
diff options
context:
space:
mode:
authorWojtek Kosior <koszko@koszko.org>2022-09-29 10:43:45 +0200
committerWojtek Kosior <koszko@koszko.org>2022-09-29 12:53:40 +0200
commitb0fcc865599cfdc87e2ca8a637df8f5b336bb459 (patch)
tree6d5e98a4834d3cbacc05be2c8163d21faf0cebd6 /src/hydrilla/proxy/web_ui/templates/rules/show_single.html.jinja
parentffe6e681b281eef2c1e62bbc6feefb0b85d040ca (diff)
downloadhaketilo-hydrilla-b0fcc865599cfdc87e2ca8a637df8f5b336bb459.tar.gz
haketilo-hydrilla-b0fcc865599cfdc87e2ca8a637df8f5b336bb459.zip
[proxy] make uniform use of section labels in the web UI
Diffstat (limited to 'src/hydrilla/proxy/web_ui/templates/rules/show_single.html.jinja')
-rw-r--r--src/hydrilla/proxy/web_ui/templates/rules/show_single.html.jinja36
1 files changed, 18 insertions, 18 deletions
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 %}
<h3>
{% if display_info.allow_scripts %}
@@ -37,21 +39,15 @@ code in a proprietary work, I am not going to enforce this in court.
{% endif %}
</h3>
+ {{ label(_('web_ui.rules.single.pattern_label')) }}
+
<p>
- {{ _('web_ui.rules.single.pattern_is_{}').format(display_info.pattern) }}
+ {{ display_info.pattern }}
</p>
- {% if rule_pattern_invalid is defined %}
- {% set checked_attr = '' %}
- {% else %}
- {% set checked_attr = 'checked=""' %}
- {% endif %}
- <input id="hide_pattern_edit_form" type="checkbox"
- class="chbx-tricks-show-hide" {{ checked_attr }}>
- <label for="hide_pattern_edit_form"
- class="green-button block-with-bottom-margin">
- {{ _('web_ui.rules.single.update_pattern_button') }}
- </label>
+ {% 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) }}
<form method="POST">
<input type="hidden" name="action" value="update_rule_data">
@@ -65,19 +61,21 @@ code in a proprietary work, I am not going to enforce this in court.
</div>
<div class="flex-row">
- <button class="green-button button-bordering-right">
+ <label for="{{ tricks.hider_id('edit_pattern') }}"
+ class="red-button button-bordering-right">
+ {{ _('web_ui.rules.single.no_update_pattern_button') }}
+ </label>
+ <div class="button-row-separator"></div>
+ <button class="green-button button-bordering-left">
{{ _('web_ui.rules.single.commit_update_pattern_button') }}
</button>
- <div class="button-row-separator"></div>
- <label for="hide_pattern_edit_form"
- class="green-button button-bordering-left">
- {{ _('web_ui.rules.single.abort_update_pattern_button') }}
- </label>
</div>
</form>
<div class="horizontal-separator"></div>
+ {{ 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.
<div class="horizontal-separator"></div>
+ {{ 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)]) }}