From e35480d6b7adf76f5bc4d46153b621abd722c681 Mon Sep 17 00:00:00 2001 From: 0livd <0livd@users.noreply.github.com> Date: Wed, 22 Feb 2017 23:40:52 +0100 Subject: Add export feature Bills and transactions can now be exported to json or csv ref #28 --- budget/templates/edit_project.html | 6 +++++- budget/templates/forms.html | 11 +++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) (limited to 'budget/templates') diff --git a/budget/templates/edit_project.html b/budget/templates/edit_project.html index 0240eff..a5e85c3 100644 --- a/budget/templates/edit_project.html +++ b/budget/templates/edit_project.html @@ -10,6 +10,10 @@ {% block content %}

{{ _("Edit this project") }}

-{{ forms.edit_project(form) }} +{{ forms.edit_project(edit_form) }} +

+

{{ _("Download this project's data") }}

+
+{{ forms.export_project(export_form) }}
{% endblock %} diff --git a/budget/templates/forms.html b/budget/templates/forms.html index 3f8cc4a..b4fa236 100644 --- a/budget/templates/forms.html +++ b/budget/templates/forms.html @@ -150,6 +150,17 @@ {% 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" %} -- cgit v1.1