aboutsummaryrefslogtreecommitdiff
path: root/budget/templates
diff options
context:
space:
mode:
authorJocelyn Delande <jocelyn@crapouillou.net>2015-08-22 01:19:27 +0200
committerJocelyn Delande <jocelyn@crapouillou.net>2016-06-16 15:52:24 +0200
commitec8fe2326b209d580922876e9b1d32cbe98646b7 (patch)
tree5b640cb12ceb154983baa141e188c3da03d158af /budget/templates
parent64c2cd56dfb58ef78936d39b2e71640cd631653e (diff)
downloadihatemoney-mirror-ec8fe2326b209d580922876e9b1d32cbe98646b7.zip
ihatemoney-mirror-ec8fe2326b209d580922876e9b1d32cbe98646b7.tar.gz
ihatemoney-mirror-ec8fe2326b209d580922876e9b1d32cbe98646b7.tar.bz2
Added member edit form
Diffstat (limited to 'budget/templates')
-rw-r--r--budget/templates/edit_member.html17
-rw-r--r--budget/templates/forms.html14
-rw-r--r--budget/templates/list_bills.html2
3 files changed, 32 insertions, 1 deletions
diff --git a/budget/templates/edit_member.html b/budget/templates/edit_member.html
new file mode 100644
index 0000000..5f097f9
--- /dev/null
+++ b/budget/templates/edit_member.html
@@ -0,0 +1,17 @@
+{% extends "layout.html" %}
+
+{% block js %}
+ $('#cancel-form').click(function(){location.href={{ url_for(".list_bills") }};});
+{% endblock %}
+
+
+{% block top_menu %}
+<a href="{{ url_for(".list_bills") }}">{{ _("Back to the list") }}</a>
+{% endblock %}
+
+{% block content %}
+
+<form class="form-horizontal" method="post">
+ {{ forms.edit_member(form, edit) }}
+</form>
+{% endblock %}
diff --git a/budget/templates/forms.html b/budget/templates/forms.html
index ec73515..07e5b3d 100644
--- a/budget/templates/forms.html
+++ b/budget/templates/forms.html
@@ -95,6 +95,20 @@
{{ form.name(placeholder=_("Type user name here")) }}<button class="btn">{{ _("Add") }}</button>
{% endmacro %}
+{% macro edit_member(form, title=True) %}
+ <fieldset>
+ {% if title %}<legend>{{ _("Edit this member") }}</legend>{% endif %}
+ {% include "display_errors.html" %}
+ {{ form.hidden_tag() }}
+ {{ input(form.name) }}
+ {{ input(form.weight) }}
+ </fieldset>
+ <div class="actions">
+ {{ form.submit(class="btn btn-primary") }}
+ </div>
+{% endmacro %}
+
+
{% macro invites(form) %}
{{ form.hidden_tag() }}
{{ input(form.emails) }}
diff --git a/budget/templates/list_bills.html b/budget/templates/list_bills.html
index 9bad344..0e0efd8 100644
--- a/budget/templates/list_bills.html
+++ b/budget/templates/list_bills.html
@@ -72,7 +72,7 @@
<td>
<form class="action delete" action="{{ url_for(".remove_member", member_id=member.id) }}" method="POST">
<button type="submit">{{ _("delete") }}</button></form>
- <form class="action edit" action="{{ url_for(".edit_member", member_id=member.id) }}" method="POST">
+ <form class="action edit" action="{{ url_for(".edit_member", member_id=member.id) }}" method="GET">
<button type="submit">{{ _("edit") }}</button></form>
</td>
{% else %}