{% macro alert(content, type=None, alert_header=None, close_button=True) -%} {# type can be success, error (or danger), info. Defaults to a warning style. #}
{%- endmacro %} {% macro label(content, type='warning') -%} {{ content|safe }} {%- endmacro %} {% macro non_field_errors(form) %} {% if form.non_field_errors %} {% for error in form.non_field_errors() %} {{ alert(content=error, type='error', close_button=False) }} {% endfor %} {% endif %} {% endmacro %} {% macro label(field) -%} {%- endmacro %} {% macro input(field, input_classes=None, prepend_content=None, append_content=None, placeholder=None, autocomplete='on') -%} {# Helper macro for rendering the input itself #} {% if prepend_content %}{{ field.description|safe }}
{% endif %}