diff options
Diffstat (limited to 'ihatemoney/templates')
| -rw-r--r-- | ihatemoney/templates/forms.html | 9 | ||||
| -rw-r--r-- | ihatemoney/templates/layout.html | 1 | ||||
| -rw-r--r-- | ihatemoney/templates/upload_json.html | 10 |
3 files changed, 20 insertions, 0 deletions
diff --git a/ihatemoney/templates/forms.html b/ihatemoney/templates/forms.html index 61127ce..95606e5 100644 --- a/ihatemoney/templates/forms.html +++ b/ihatemoney/templates/forms.html @@ -85,6 +85,15 @@ {% endmacro %} +{% macro upload_json(form) %} + {% include "display_errors.html" %} + {{ form.hidden_tag() }} + {{ form.file }} + <div class="actions"> + <button class="btn btn-primary">{{ _("Import") }}</button> + </div> +{% endmacro %} + {% macro add_bill(form, edit=False, title=True) %} <fieldset> diff --git a/ihatemoney/templates/layout.html b/ihatemoney/templates/layout.html index 7ff7296..664182a 100644 --- a/ihatemoney/templates/layout.html +++ b/ihatemoney/templates/layout.html @@ -42,6 +42,7 @@ <li class="nav-item{% if current_view == 'settle_bill' %} active{% endif %}"><a class="nav-link" href="{{ url_for("main.settle_bill") }}">{{ _("Settle") }}</a></li> <li class="nav-item{% if current_view == 'statistics' %} active{% endif %}"><a class="nav-link" href="{{ url_for("main.statistics") }}">{{ _("Statistics") }}</a></li> <li class="nav-item{% if current_view == 'edit_project' %} active{% endif %}"><a class="nav-link" href="{{ url_for("main.edit_project") }}">{{ _("Settings") }}</a></li> + <li class="nav-item{% if current_view == 'upload_json' %} active{% endif %}"><a class="nav-link" href="{{ url_for("main.upload_json") }}">{{ _("Import") }}</a></li> {% endblock %} {% endif %} </ul> diff --git a/ihatemoney/templates/upload_json.html b/ihatemoney/templates/upload_json.html new file mode 100644 index 0000000..64aca0f --- /dev/null +++ b/ihatemoney/templates/upload_json.html @@ -0,0 +1,10 @@ +{% extends "layout.html" %}
+
+{% block content %}
+ <h2>{{ _("Import JSON") }}</h2>
+ <p>
+ <form class="form-horizontal" method="post" enctype="multipart/form-data">
+ {{ forms.upload_json(form) }}
+ </form>
+ </p>
+{% endblock %}
|
