diff --git a/print_designer/print_designer/page/print_designer/jinja/macros/spantag.html b/print_designer/print_designer/page/print_designer/jinja/macros/spantag.html index 04297f5..68c91ff 100644 --- a/print_designer/print_designer/page/print_designer/jinja/macros/spantag.html +++ b/print_designer/print_designer/page/print_designer/jinja/macros/spantag.html @@ -24,18 +24,26 @@ {% macro span_tag(field, element, row = {}, send_to_jinja = {}) -%} {% set span_value = spanvalue(field, element, row, send_to_jinja) %} - - {% if not field.is_static and field.is_labelled and span_value %} - - {{ _(field.label) }} - - {% endif %} + {%- if span_value -%} + + {% if not field.is_static and field.is_labelled%} + + {{ _(field.label) }} + + {% endif %} {{ span_value }} - {% if field.nextLine %} -
- {% endif %} -
+ {% if field.suffix %} + + {{ _(field.suffix) }} + + {% endif %} + {% if field.nextLine %} +
+ {% endif %} +
+ {% endif %} {%- endmacro %} \ No newline at end of file diff --git a/print_designer/print_designer/page/print_designer/jinja/old_print_format.html b/print_designer/print_designer/page/print_designer/jinja/old_print_format.html index c1fb537..0a54666 100644 --- a/print_designer/print_designer/page/print_designer/jinja/old_print_format.html +++ b/print_designer/print_designer/page/print_designer/jinja/old_print_format.html @@ -140,26 +140,28 @@ {% macro render_spantag(field, element, row = {}, send_to_jinja = {}) -%} {% set span_value = render_spanvalue(field, element, row, send_to_jinja) %} - - {% if not field.is_static and field.is_labelled and span_value %} - - {{ _(field.label) }} - - {% endif %} - - {{ span_value }} - - {% if field.suffix and span_value %} - - {{ _(field.suffix) }} +{%- if span_value -%} + + {% if not field.is_static and field.is_labelled %} + + {{ _(field.label) }} + + {% endif %} + + {{ span_value }} + + {% if field.suffix %} + + {{ _(field.suffix) }} + + {% endif %} + {% if field.nextLine %} +
+ {% endif %}
- {% endif %} - {% if field.nextLine %} -
- {% endif %} -
+{% endif %} {%- endmacro %} {% macro render_element(element, send_to_jinja) -%} {% if element is iterable and (element is not string and element is not mapping) %}