{% macro input(field, multiple=False) -%}
{% if field.type != "SubmitField" %} {{ field.label }} {% endif %}
{% if multiple == True %} {{ field(multiple=True) }} {% else %} {{ field }} {% endif %} {% if field.description %} {{ field.description }} {% endif %}
{% endmacro %} {% macro submit(field, cancel=False) -%}
{% if cancel %} {% endif %}
{% endmacro %} {% macro authenticate(form, home=False) %} {% include "display_errors.html" %} {{ form.hidden_tag() }} {{ input(form.id) }} {{ input(form.password) }} {% if not home %} {{ submit(form.submit) }} {% endif %} {% endmacro %} {% macro create_project(form, home=False) %} {% include "display_errors.html" %} {{ form.hidden_tag() }} {{ input(form.name) }} {{ input(form.id) }} {{ input(form.password) }} {{ input(form.contact_email) }} {% if not home %} {{ submit(form.submit) }} {% endif %} {% endmacro %} {% macro add_bill(form) %}
Add a bill {% include "display_errors.html" %} {{ form.hidden_tag() }} {{ input(form.date) }} {{ input(form.what) }} {{ input(form.payer) }} {{ input(form.amount) }} {{ input(form.payed_for) }}
{{ submit(form.submit, cancel=True) }} {% endmacro %} {% macro add_member(form) %} {{ form.hidden_tag() }} {{ form.name }} {% endmacro %} {% macro invites(form) %} {{ form.hidden_tag() }} {{ input(form.emails) }}
No, thanks
{% endmacro %}