From 37b3cf9fb2a56cfa980844f527d834916b38cca8 Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Tue, 25 Oct 2022 11:30:45 +0200 Subject: [proxy] make Haketilo popup functional * Ad hoc payload creation was additionally fixed in this commit. * Addition on newly created script blocking/allowing rules to pattern tree was additionally fixed in this commit. It is no longer necessary to restart Haketilo for new rules to come into effect. --- .../common_jinja_templates/base.html.jinja | 30 +++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) (limited to 'src/hydrilla/common_jinja_templates') diff --git a/src/hydrilla/common_jinja_templates/base.html.jinja b/src/hydrilla/common_jinja_templates/base.html.jinja index 08178b3..0c29c0c 100644 --- a/src/hydrilla/common_jinja_templates/base.html.jinja +++ b/src/hydrilla/common_jinja_templates/base.html.jinja @@ -67,7 +67,15 @@ code in a proprietary work, I am not going to enforce this in court. {% endmacro %} -{% macro form_field(field_name, required=true, sep_after=true, height=none) %} +{% + macro form_field( + field_name, + required = true, + sep_after = true, + height = none, + initial_value = none + ) +%}
{% set attrs = { @@ -79,9 +87,11 @@ code in a proprietary work, I am not going to enforce this in court. %} {% if height is none %} + {% do attrs.update({'value': initial_value}) %} {% else %} - + {% set value = initial_value|default('', true) %} + {{ value }} {% endif %}
@@ -90,10 +100,17 @@ code in a proprietary work, I am not going to enforce this in court. {% endif %} {% endmacro %} +{% macro verbatim(code) %} +
{{ code }}
+{% endmacro %} + {% block head %} -