aboutsummaryrefslogtreecommitdiff
path: root/ihatemoney
diff options
context:
space:
mode:
Diffstat (limited to 'ihatemoney')
-rw-r--r--ihatemoney/templates/display_message.html8
-rw-r--r--ihatemoney/web.py9
2 files changed, 15 insertions, 2 deletions
diff --git a/ihatemoney/templates/display_message.html b/ihatemoney/templates/display_message.html
new file mode 100644
index 0000000..37be42a
--- /dev/null
+++ b/ihatemoney/templates/display_message.html
@@ -0,0 +1,8 @@
+{% extends "layout.html" %}
+
+{% block content %}
+<h2>{{ _(title) }}</h2>
+<p>
+ {{message}}
+</p>
+{% endblock %}
diff --git a/ihatemoney/web.py b/ihatemoney/web.py
index 8ab3217..1e1a72f 100644
--- a/ihatemoney/web.py
+++ b/ihatemoney/web.py
@@ -271,18 +271,23 @@ def remind_password():
if form.validate():
# get the project
project = Project.query.get(form.id.data)
-
# send a link to reset the password
password_reminder = "password_reminder.%s.j2" % get_locale().language
current_app.mail.send(Message(
"password recovery",
body=render_template(password_reminder, project=project),
recipients=[project.contact_email]))
- flash(_("A link to reset your password has been sent to your email."))
+ return redirect(url_for(".password_reminder_sent"))
return render_template("password_reminder.html", form=form)
+@main.route("/password-reminder-sent", methods=["GET"])
+def password_reminder_sent():
+ message = "A link to reset your password has been sent to you, please check your emails"
+ return render_template("display_message.html", title="Password reminder", message=message)
+
+
@main.route('/reset-password', methods=['GET', 'POST'])
def reset_password():
form = ResetPasswordForm()