forked from gergely/calendar-social
Add a field macro to the event creation form
This commit is contained in:
21
calsocial/templates/_macros.html
Normal file
21
calsocial/templates/_macros.html
Normal 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 %}
|
Reference in New Issue
Block a user