aboutsummaryrefslogtreecommitdiff
path: root/app/templates
diff options
context:
space:
mode:
authorGertjan van den Burg <gertjanvandenburg@gmail.com>2019-03-18 16:05:36 +0000
committerGertjan van den Burg <gertjanvandenburg@gmail.com>2019-03-18 16:05:36 +0000
commitb499f31dfcb4e3cf27c34ae0958612a9d43bf910 (patch)
tree71e19ad212225060c1ccd3bd9308e0420b1f3ad8 /app/templates
parentadd gitignore (diff)
downloadAnnotateChange-b499f31dfcb4e3cf27c34ae0958612a9d43bf910.tar.gz
AnnotateChange-b499f31dfcb4e3cf27c34ae0958612a9d43bf910.zip
add errors, email, and reset password
Diffstat (limited to 'app/templates')
-rw-r--r--app/templates/404.html6
-rw-r--r--app/templates/500.html7
-rw-r--r--app/templates/email/reset_password.html12
-rw-r--r--app/templates/email/reset_password.txt11
-rw-r--r--app/templates/login.html4
-rw-r--r--app/templates/reset_password.html23
-rw-r--r--app/templates/reset_password_request.html15
7 files changed, 78 insertions, 0 deletions
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 %}
+ <h1>Page Not Found</h1>
+ <p><a href="{{ url_for('index') }}">Home</p>
+{% 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 %}
+ <h1>An unexpected error has occurred</h1>
+ <p>The administrator has been notified, apologies for the inconvenience.</p>
+ <p><a href="{{ url_for('index') }}">Home</p>
+{% 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 @@
+<p>Dear {{ user.username }},</p>
+<p>
+ To reset your password
+ <a href="{{ url_for('reset_password', token=token, _external=True) }}">
+ click here
+ </a>.
+</p>
+<p>Alternatively, you can paste the following link in your browser's address bar:</p>
+<p>{{ url_for('reset_password', token=token, _external=True) }}</p>
+<p>If you have not requested a password reset then you can simply ignore this email.</p>
+<p>Sincerely,</p>
+<p>The AnnotateChange Team</p>
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 @@
<p>{{ form.submit() }}</p>
</form>
<p>New User? <a href="{{ url_for('register') }}">Click to Register!</a></p>
+ <p>
+ Forgot your password?
+ <a href="{{ url_for('reset_password_request') }}">Click here to reset it</a>
+ </p>
{% 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 %}
+ <h1>Reset Your Password</h1>
+ <form action="" method="post">
+ {{ form.hidden_tag() }}
+ <p>
+ {{ form.password.label }}<br>
+ {{ form.password(size=32) }}<br>
+ {% for error in form.password.errors %}
+ <span stle="color: red;">[{{ error }}]</span>
+ {% endfor %}
+ </p>
+ <p>
+ {{ form.password2.label }}<br>
+ {{ form.password2(size=32) }}<br>
+ {% for error in form.password2.errors %}
+ <span stle="color: red;">[{{ error }}]</span>
+ {% endfor %}
+ </p>
+ <p>{{ form.submit() }}</p>
+ </form>
+{% 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 %}
+ <h1>Reset Password</h1>
+ <form action="" method="post">
+ {{ form.hidden_tag() }}
+ <p>
+ {{ form.email.label }}<br>
+ {{ form.email(size=64) }}<br>
+ {% for error in form.email.errors %}
+ <span style="color: red;">[{{ error }}]</span>
+ {% endfor %}
+ </p>
+ </form>
+{% endblock %}