{% 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, home=False) -%}
{% if home %} Back Home {% endif %} {% 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() }} {% if not home %} {{ input(form.id) }} {% endif %} {{ input(form.name) }} {{ input(form.password) }} {{ input(form.contact_email) }} {% if not home %} {{ submit(form.submit, home=True) }} {% endif %} {% endmacro %} {% macro add_bill(form, edit=False) %}
{% if edit %}Edit this {% else %}Add a {% endif %}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 %} {% macro create_archive(form) %}
Create an archive {{ form.hidden_tag() }} {{ input(form.start_date) }} {{ input(form.end_date) }}
{% endmacro %}