From 3a4282fd75e3b3317b2b08b4aa2e6ac154310e73 Mon Sep 17 00:00:00 2001 From: Alexis Metaireau Date: Fri, 7 Jul 2017 00:06:56 +0200 Subject: Absolute imports & some other improvements (#243) * Use absolute imports and rename package to ihatemoney * Add a ihatemoney command * Factorize application creation logic * Refactor the tests * Update the wsgi.py module with the new create_app() function * Fix some styling thanks to Flake8. * Automate Flake8 check in the CI. --- budget/templates/forms.html | 168 -------------------------------------------- 1 file changed, 168 deletions(-) delete mode 100644 budget/templates/forms.html (limited to 'budget/templates/forms.html') diff --git a/budget/templates/forms.html b/budget/templates/forms.html deleted file mode 100644 index ffdd165..0000000 --- a/budget/templates/forms.html +++ /dev/null @@ -1,168 +0,0 @@ -{% 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 admin(form) %} - - {% include "display_errors.html" %} - - {{ form.hidden_tag() }} - {{ input(form.admin_password) }} - {{ submit(form.submit) }} - -{% 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 export_project(form) %} -
- {{ form.hidden_tag() }} - {{ input(form.export_type) }} - {{ input(form.export_format) }} -
-
- -
-{% endmacro %} - -{% macro remind_password(form) %} - - {% include "display_errors.html" %} - {{ form.hidden_tag() }} - {{ input(form.id) }} - {{ submit(form.submit) }} - -{% endmacro %} -- cgit v1.1