aboutsummaryrefslogtreecommitdiff
path: root/budget/templates
diff options
context:
space:
mode:
authorAlexis Metaireau <alexis@notmyidea.org>2011-09-14 22:03:18 +0200
committerAlexis Metaireau <alexis@notmyidea.org>2011-09-14 22:03:18 +0200
commit20ab40690d74befcd8fc75f24f301759840bf43a (patch)
treed92319ad0f5cc6b6b506f8c918fd30549eb81b69 /budget/templates
parent5721be1d15ba02e47f98fb9a487248adb297a082 (diff)
downloadihatemoney-mirror-20ab40690d74befcd8fc75f24f301759840bf43a.zip
ihatemoney-mirror-20ab40690d74befcd8fc75f24f301759840bf43a.tar.gz
ihatemoney-mirror-20ab40690d74befcd8fc75f24f301759840bf43a.tar.bz2
Provide a way to edit a project. Fix #17
Diffstat (limited to 'budget/templates')
-rw-r--r--budget/templates/create_project.html9
-rw-r--r--budget/templates/forms.html11
-rw-r--r--budget/templates/layout.html2
3 files changed, 15 insertions, 7 deletions
diff --git a/budget/templates/create_project.html b/budget/templates/create_project.html
index 6593822..41b8fd0 100644
--- a/budget/templates/create_project.html
+++ b/budget/templates/create_project.html
@@ -2,10 +2,7 @@
{% block content %}
<h2>Create a new project</h2>
-<div class="uniForm">
- <form method="post" class="container span-24 add-bill">
- {{ forms.create_project(form) }}
- </form>
-</div>
+<form method="post">
+ {{ forms.create_project(form) }}
+</form>
{% endblock %}
-
diff --git a/budget/templates/forms.html b/budget/templates/forms.html
index b027763..f32e9fd 100644
--- a/budget/templates/forms.html
+++ b/budget/templates/forms.html
@@ -52,6 +52,17 @@
{% endmacro %}
+{% macro edit_project(form) %}
+
+ {% include "display_errors.html" %}
+ {{ form.hidden_tag() }}
+ {{ input(form.name) }}
+ {{ input(form.password) }}
+ {{ input(form.contact_email) }}
+ {{ submit(form.submit) }}
+
+{% endmacro %}
+
{% macro add_bill(form, edit=False) %}
<fieldset>
diff --git a/budget/templates/layout.html b/budget/templates/layout.html
index d79c39f..8858150 100644
--- a/budget/templates/layout.html
+++ b/budget/templates/layout.html
@@ -52,7 +52,7 @@
<li class="menu">
<a href="#" class="menu"><strong>{{ g.project.name }}</strong> options</a>
<ul class="menu-dropdown" style="display: none; ">
- <li><a href="">Project settings</a></li>
+ <li><a href="{{ url_for(".edit_project") }}">Project settings</a></li>
<li class="divider"></li>
{% for id, name in session['projects'] %}
{% if id != g.project.id %}