calendar-social/calsocial/templates/_macros.html

21 lines
515 B
HTML
Raw Permalink Normal View History

{% macro field(field, inline=false) %}
2018-07-13 08:19:37 +00:00
<div class="{% if inline %}inline {% endif %}field">
{% if field.errors %}
{% for error in field.errors %}
2018-07-13 08:19:37 +00:00
{{ error }}
{% endfor %}
2018-07-13 08:19:37 +00:00
<br>
{% endif %}
{% if field.widget.input_type != 'checkbox' %}
2018-07-13 08:19:37 +00:00
{{ field.label }}
{% endif %}
2018-07-13 08:19:37 +00:00
{{ field }}
{% if field.widget.input_type == 'checkbox' %}
2018-07-13 08:19:37 +00:00
{{ field.label }}<br>
{% endif %}
{% if field.description %}
2018-07-13 08:19:37 +00:00
{{ field.description }}
{% endif %}
2018-07-13 08:19:37 +00:00
</div>
{% endmacro %}