From b499f31dfcb4e3cf27c34ae0958612a9d43bf910 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Mon, 18 Mar 2019 16:05:36 +0000 Subject: add errors, email, and reset password --- app/templates/404.html | 6 ++++++ app/templates/500.html | 7 +++++++ app/templates/email/reset_password.html | 12 ++++++++++++ app/templates/email/reset_password.txt | 11 +++++++++++ app/templates/login.html | 4 ++++ app/templates/reset_password.html | 23 +++++++++++++++++++++++ app/templates/reset_password_request.html | 15 +++++++++++++++ 7 files changed, 78 insertions(+) create mode 100644 app/templates/404.html create mode 100644 app/templates/500.html create mode 100644 app/templates/email/reset_password.html create mode 100644 app/templates/email/reset_password.txt create mode 100644 app/templates/reset_password.html create mode 100644 app/templates/reset_password_request.html (limited to 'app/templates') diff --git a/app/templates/404.html b/app/templates/404.html new file mode 100644 index 0000000..7dde47e --- /dev/null +++ b/app/templates/404.html @@ -0,0 +1,6 @@ +{% extends "base.html" %} + +{% block content %} +

Page Not Found

+

Home

+{% endblock %} diff --git a/app/templates/500.html b/app/templates/500.html new file mode 100644 index 0000000..ca8830c --- /dev/null +++ b/app/templates/500.html @@ -0,0 +1,7 @@ +{% extends "base.html" %} + +{% block content %} +

An unexpected error has occurred

+

The administrator has been notified, apologies for the inconvenience.

+

Home

+{% endblock %} diff --git a/app/templates/email/reset_password.html b/app/templates/email/reset_password.html new file mode 100644 index 0000000..f7403a5 --- /dev/null +++ b/app/templates/email/reset_password.html @@ -0,0 +1,12 @@ +

Dear {{ user.username }},

+

+ To reset your password + + click here + . +

+

Alternatively, you can paste the following link in your browser's address bar:

+

{{ url_for('reset_password', token=token, _external=True) }}

+

If you have not requested a password reset then you can simply ignore this email.

+

Sincerely,

+

The AnnotateChange Team

diff --git a/app/templates/email/reset_password.txt b/app/templates/email/reset_password.txt new file mode 100644 index 0000000..da1330f --- /dev/null +++ b/app/templates/email/reset_password.txt @@ -0,0 +1,11 @@ +Dear {{ user.username }}, + +To reset your password click on the following link: + +{{ url_for('reset_password', token=token, _external=True) }} + +If you have not requested a password reset then you can simply ignore this email. + +Sincerely, + +The AnnotateChange Team diff --git a/app/templates/login.html b/app/templates/login.html index 77410a1..4d5181b 100644 --- a/app/templates/login.html +++ b/app/templates/login.html @@ -22,4 +22,8 @@

{{ form.submit() }}

New User? Click to Register!

+

+ Forgot your password? + Click here to reset it +

{% endblock %} diff --git a/app/templates/reset_password.html b/app/templates/reset_password.html new file mode 100644 index 0000000..da3aa95 --- /dev/null +++ b/app/templates/reset_password.html @@ -0,0 +1,23 @@ +{% extends "base.html" %} + +{% block content %} +

Reset Your Password

+
+ {{ form.hidden_tag() }} +

+ {{ form.password.label }}
+ {{ form.password(size=32) }}
+ {% for error in form.password.errors %} + [{{ error }}] + {% endfor %} +

+

+ {{ form.password2.label }}
+ {{ form.password2(size=32) }}
+ {% for error in form.password2.errors %} + [{{ error }}] + {% endfor %} +

+

{{ form.submit() }}

+
+{% endblock %} diff --git a/app/templates/reset_password_request.html b/app/templates/reset_password_request.html new file mode 100644 index 0000000..914c593 --- /dev/null +++ b/app/templates/reset_password_request.html @@ -0,0 +1,15 @@ +{% extends "base.html" %} + +{% block content %} +

Reset Password

+
+ {{ form.hidden_tag() }} +

+ {{ form.email.label }}
+ {{ form.email(size=64) }}
+ {% for error in form.email.errors %} + [{{ error }}] + {% endfor %} +

+
+{% endblock %} -- cgit v1.2.3