Add a field macro to the event creation form

This commit is contained in:
2018-07-13 11:22:28 +02:00
parent a133218906
commit d06cfaa02e
7 changed files with 49 additions and 74 deletions

View File

@@ -0,0 +1,21 @@
{% macro field(field, inline=false) %}
{% if field.errors %}
{% for error in field.errors %}
{{ error }}
{% endfor %}
<br>
{% endif %}
{% if field.widget.input_type != 'checkbox' %}
{{ field.label }}
{% endif %}
{{ field }}
{% if field.widget.input_type == 'checkbox' %}
{{ field.label }}
{% endif %}
{% if not inline %}
<br>
{% endif %}
{% if field.description %}
{{ field.description }}
{% endif %}
{% endmacro %}