aboutsummaryrefslogtreecommitdiff
path: root/budget/templates
diff options
context:
space:
mode:
Diffstat (limited to 'budget/templates')
-rw-r--r--budget/templates/authenticate.html4
-rw-r--r--budget/templates/forms.html12
-rw-r--r--budget/templates/home.html1
-rw-r--r--budget/templates/password_reminder8
-rw-r--r--budget/templates/password_reminder.html8
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 %}