{% macro input(field, multiple=False, class='form-control', inline=False) -%}
{% if field.type != "SubmitField" %} {% if inline %} {{ field.label(class="col-3") }} {% else %} {{ field.label() }} {% endif %} {% endif %}
{% if multiple == True %} {{ field(multiple=True, class=class) }} {% else %} {{ field(class=class) | safe }} {% endif %} {% if field.description %}

{{ field.description }}

{% endif %}
{% endmacro %} {% macro submit(field, cancel=False, home=False) -%}
{% if home %} {{ _("Can't remember the password?") }} {% 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, home=True) }} {% 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 edit_project(form) %} {% include "display_errors.html" %} {{ form.hidden_tag() }} {{ input(form.name) }} {{ input(form.password) }} {{ input(form.contact_email) }}
{{ _("delete") }}
{% endmacro %} {% macro add_bill(form, edit=False, title=True) %}
{% if title %}{% if edit %}{{ _("Edit this bill") }} {% else %}{{ _("Add a bill") }} {% endif %}{% endif %} {% include "display_errors.html" %} {{ form.hidden_tag() }} {{ input(form.date, class="form-control datepicker", inline=True) }} {{ input(form.what, inline=True) }} {{ input(form.payer, inline=True, class="form-control custom-select") }} {{ input(form.amount, inline=True) }}
{{ form.submit(class="btn btn-primary") }} {% if not edit %} {{ form.submit2(class="btn") }}{% endif %}
{% endmacro %} {% macro add_member(form) %} {{ form.hidden_tag() }}
{{ form.name(placeholder=_("Type user name here"), class="form-control") }}
{% endmacro %} {% macro edit_member(form, title=True) %}
{% if title %}{{ _("Edit this member") }}{% endif %} {% include "display_errors.html" %} {{ form.hidden_tag() }} {{ input(form.name) }} {{ input(form.weight) }}
{{ form.submit(class="btn btn-primary") }}
{% 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.name) }} {{ input(form.start_date) }} {{ input(form.end_date) }}
{% endmacro %} {% macro remind_password(form) %} {% include "display_errors.html" %} {{ form.hidden_tag() }} {{ input(form.id) }} {{ submit(form.submit) }} {% endmacro %}