Implement group support (we call ’em circles)

This commit is contained in:
Jonas Schäfer
2021-01-18 17:36:43 +01:00
parent 006fea97a6
commit 17efe53106
20 changed files with 1165 additions and 233 deletions

View File

@@ -72,3 +72,28 @@
{% endif -%}
</a>
{%- endmacro %}
{% macro render_errors(field, caller=None) -%}
{%- if field.errors -%}
<div class="box warning">{#- -#}
<header>{% trans %}Invalid input{% endtrans %}</header>
{%- if field.errors | length == 1 -%}
<p>{{ field.errors[0] }}.</p>
{%- else -%}
<ul>
{%- for error in field.errors -%}
<li>{{ error }}</li>
{%- endfor -%}
</ul>
{%- endif -%}
</div>
{%- endif -%}
{%- endmacro %}
{% macro value_or_hint(v, caller=None) %}
{%- if v is not none -%}
{{- v -}}
{%- else -%}
{%- endif -%}
{% endmacro %}