mirror of
https://github.com/YunoHost-Apps/ihatemoney_ynh.git
synced 2024-09-03 19:26:15 +02:00
79 lines
1.9 KiB
HTML
79 lines
1.9 KiB
HTML
{% macro input(field, multiple=False) -%}
|
|
<div class="clearfix">
|
|
|
|
{% if field.type != "SubmitField" %}
|
|
{{ field.label }}
|
|
{% endif %}
|
|
<div class="input">
|
|
{% if multiple == True %}
|
|
{{ field(multiple=True) }}
|
|
{% else %}
|
|
{{ field }}
|
|
{% endif %}
|
|
{% if field.description %}
|
|
<span class="help-inline">{{ field.description }}</span>
|
|
{% endif %}
|
|
</div>
|
|
</div> <!-- /clearfix -->
|
|
{% endmacro %}
|
|
|
|
{% macro submit(field, cancel=False) -%}
|
|
<div class="actions">
|
|
<button type="submit" class="btn primary">{{ field.name }}</button>
|
|
{% if cancel %}
|
|
<button id="cancel-form" type="reset" class="btn">Cancel</button>
|
|
{% endif %}
|
|
</div>
|
|
{% endmacro %}
|
|
|
|
{% macro authenticate(form) %}
|
|
|
|
{% include "display_errors.html" %}
|
|
{{ form.hidden_tag() }}
|
|
{{ input(form.id) }}
|
|
{{ input(form.password) }}
|
|
{{ submit(form.submit) }}
|
|
|
|
{% endmacro %}
|
|
|
|
{% macro create_project(form) %}
|
|
|
|
{% include "display_errors.html" %}
|
|
{{ form.hidden_tag() }}
|
|
{{ input(form.name) }}
|
|
{{ input(form.id) }}
|
|
{{ input(form.password) }}
|
|
{{ input(form.contact_email) }}
|
|
{{ submit(form.submit) }}
|
|
|
|
{% endmacro %}
|
|
|
|
{% macro add_bill(form) %}
|
|
|
|
<fieldset>
|
|
<legend>Add a bill</legend>
|
|
{% include "display_errors.html" %}
|
|
{{ form.hidden_tag() }}
|
|
{{ input(form.date) }}
|
|
{{ input(form.what) }}
|
|
{{ input(form.payer) }}
|
|
{{ input(form.amount) }}
|
|
{{ input(form.payed_for) }}
|
|
</fieldset>
|
|
{{ submit(form.submit, cancel=True) }}
|
|
|
|
{% endmacro %}
|
|
|
|
{% macro add_member(form) %}
|
|
{{ form.hidden_tag() }}
|
|
{{ form.name }}
|
|
<button class="btn">Add a new user</button>
|
|
|
|
{% endmacro %}
|
|
|
|
{% macro authenticate(form) %}
|
|
{{ form.hidden_tag() }}
|
|
{{ input(form.id) }}
|
|
{{ input(form.password) }}
|
|
{{ submit(form.submit) }}
|
|
{% endmacro %}
|