diff options
| author | Alexis Metaireau <alexis@notmyidea.org> | 2011-10-08 15:52:12 +0200 |
|---|---|---|
| committer | Alexis Metaireau <alexis@notmyidea.org> | 2011-10-08 15:52:12 +0200 |
| commit | 75209aeed0140c804047b4f3466d329b9eb246b9 (patch) | |
| tree | 51cbe453bc31e3418e050f0e780ac99e3c57ba92 /budget/templates | |
| parent | 1338653bd2234a60eab368f58dcd8d2bcb3f3d6b (diff) | |
| download | ihatemoney-mirror-75209aeed0140c804047b4f3466d329b9eb246b9.zip ihatemoney-mirror-75209aeed0140c804047b4f3466d329b9eb246b9.tar.gz ihatemoney-mirror-75209aeed0140c804047b4f3466d329b9eb246b9.tar.bz2 | |
Add a password recovery feature. Fix #32
Diffstat (limited to 'budget/templates')
| -rw-r--r-- | budget/templates/authenticate.html | 4 | ||||
| -rw-r--r-- | budget/templates/forms.html | 12 | ||||
| -rw-r--r-- | budget/templates/home.html | 1 | ||||
| -rw-r--r-- | budget/templates/password_reminder | 8 | ||||
| -rw-r--r-- | budget/templates/password_reminder.html | 8 |
5 files changed, 28 insertions, 5 deletions
diff --git a/budget/templates/authenticate.html b/budget/templates/authenticate.html index 9852d6a..83839e1 100644 --- a/budget/templates/authenticate.html +++ b/budget/templates/authenticate.html @@ -2,10 +2,6 @@ {% block content %} <h2>Authentication</h2> -{% for errors in form.errors.values() %} -<p class=error>{{ ", ".join(errors) }}</p> -{% endfor %} - {% if create_project %} <p class="info">The project you are trying to access do not exist, do you want to <a href="{{ url_for(".create_project", project_id=create_project) }}">create it</a>? diff --git a/budget/templates/forms.html b/budget/templates/forms.html index 80a0d17..beb714b 100644 --- a/budget/templates/forms.html +++ b/budget/templates/forms.html @@ -21,7 +21,7 @@ <div class="actions"> <button type="submit" class="btn primary">{{ field.name }}</button> {% if home %} - <a href="{{ url_for(".home") }}">Go back Home</a> + <a href="{{ url_for(".remind_password") }}">Can't remember the password?</a> {% endif %} {% if cancel %} <button id="cancel-form" type="reset" class="btn">Cancel</button> @@ -32,6 +32,7 @@ {% macro authenticate(form, home=False) %} {% include "display_errors.html" %} + {{ form.hidden_tag() }} {{ input(form.id) }} {{ input(form.password) }} @@ -111,3 +112,12 @@ <button class="btn">Create the archive</button> </div> {% endmacro %} + +{% macro remind_password(form) %} + + {% include "display_errors.html" %} + {{ form.hidden_tag() }} + {{ input(form.id) }} + {{ submit(form.submit) }} + +{% endmacro %} diff --git a/budget/templates/home.html b/budget/templates/home.html index ceb3b57..bf74767 100644 --- a/budget/templates/home.html +++ b/budget/templates/home.html @@ -26,6 +26,7 @@ <h3>Log to an existing project...</h3> {{ forms.authenticate(auth_form, home=True) }} <button class="btn">log in</button> + <a class="password-reminder" href="{{ url_for(".remind_password") }}">can't remember your password?</a> </form> </div> <div class="span8 columns"> diff --git a/budget/templates/password_reminder b/budget/templates/password_reminder new file mode 100644 index 0000000..fc24a6f --- /dev/null +++ b/budget/templates/password_reminder @@ -0,0 +1,8 @@ +Hi, + +You requested to be reminded about your password for "{{ project.name }}". + +You can access it here: {{ config['SITE_URL'] }}{{ url_for(".list_bills", project_id=project.id) }}, the private code is "{{ project.password }}". + +Hope this helps, +Some weird guys (with beards) diff --git a/budget/templates/password_reminder.html b/budget/templates/password_reminder.html new file mode 100644 index 0000000..0110cb8 --- /dev/null +++ b/budget/templates/password_reminder.html @@ -0,0 +1,8 @@ +{% extends "layout.html" %} + +{% block content %} +<h2>Password reminder</h2> +<form method="post"> +{{ forms.remind_password(form) }} +</form> +{% endblock %} |
