From 6adfdbabe0d44c17f32abc9d48a6e252e2a0792e Mon Sep 17 00:00:00 2001 From: Andrew Godwin Date: Thu, 17 Nov 2022 19:16:34 -0700 Subject: Add signup and password reset --- templates/activities/_menu.html | 4 ++-- templates/auth/reset.html | 20 ++++++++++++++++++++ templates/auth/reset_success.html | 14 ++++++++++++++ templates/auth/signup.html | 18 ++++++++++++++++++ templates/auth/signup_success.html | 15 +++++++++++++++ templates/emails/new_account.txt | 8 ++++++++ templates/emails/password_reset.txt | 8 ++++++++ 7 files changed, 85 insertions(+), 2 deletions(-) create mode 100644 templates/auth/reset.html create mode 100644 templates/auth/reset_success.html create mode 100644 templates/auth/signup.html create mode 100644 templates/auth/signup_success.html create mode 100644 templates/emails/new_account.txt create mode 100644 templates/emails/password_reset.txt (limited to 'templates') diff --git a/templates/activities/_menu.html b/templates/activities/_menu.html index a671712..6b40197 100644 --- a/templates/activities/_menu.html +++ b/templates/activities/_menu.html @@ -23,11 +23,11 @@ Settings {% else %} - + Local Posts

- + Create Account {% endif %} diff --git a/templates/auth/reset.html b/templates/auth/reset.html new file mode 100644 index 0000000..42eced9 --- /dev/null +++ b/templates/auth/reset.html @@ -0,0 +1,20 @@ +{% extends "base.html" %} + +{% block title %}Reset Password{% endblock %} + +{% block content %} +
+ {% csrf_token %} +
+ Reset Password +

You are resetting your password for {{ reset.user.email }}.

+

Please choose your new password below.

+ {% for field in form %} + {% include "forms/_field.html" %} + {% endfor %} +
+
+ +
+
+{% endblock %} diff --git a/templates/auth/reset_success.html b/templates/auth/reset_success.html new file mode 100644 index 0000000..001e5d7 --- /dev/null +++ b/templates/auth/reset_success.html @@ -0,0 +1,14 @@ +{% extends "base.html" %} + +{% block title %}Password Reset{% endblock %} + +{% block content %} +
+
+ Password Reset +

+ Your password for {{ email }} has been reset! +

+
+
+{% endblock %} diff --git a/templates/auth/signup.html b/templates/auth/signup.html new file mode 100644 index 0000000..d519476 --- /dev/null +++ b/templates/auth/signup.html @@ -0,0 +1,18 @@ +{% extends "base.html" %} + +{% block title %}Create Account{% endblock %} + +{% block content %} +
+ {% csrf_token %} +
+ Create An Account + {% for field in form %} + {% include "forms/_field.html" %} + {% endfor %} +
+
+ +
+
+{% endblock %} diff --git a/templates/auth/signup_success.html b/templates/auth/signup_success.html new file mode 100644 index 0000000..20fc7c2 --- /dev/null +++ b/templates/auth/signup_success.html @@ -0,0 +1,15 @@ +{% extends "base.html" %} + +{% block title %}Email Sent{% endblock %} + +{% block content %} +
+
+ Email Sent +

+ An email has been sent to {{ email }} - please follow + the link inside to finish creating your account. +

+
+
+{% endblock %} diff --git a/templates/emails/new_account.txt b/templates/emails/new_account.txt new file mode 100644 index 0000000..73c7fa4 --- /dev/null +++ b/templates/emails/new_account.txt @@ -0,0 +1,8 @@ +Your email address was used to create a new account at {{config.site_name}} (https://{{settings.MAIN_DOMAIN}}). + +To confirm your new account, go to this link: + +https://{{settings.MAIN_DOMAIN}}/auth/reset/{{reset.token}}/ + +If this was not you, then please ignore this message - your email will not be +used to make an account if this link is not visited. diff --git a/templates/emails/password_reset.txt b/templates/emails/password_reset.txt new file mode 100644 index 0000000..989960f --- /dev/null +++ b/templates/emails/password_reset.txt @@ -0,0 +1,8 @@ +A password reset was requested for your account ({{reset.user.email}}) at {{Config.system.site_name}} (https://{{settings.MAIN_DOMAIN}}). + +To reset your password, go to this link: + +https://{{settings.MAIN_DOMAIN}}/auth/reset/{{reset.token}}/ + +If this was not you, then please ignore this message - your password will not be +reset if this link is not visited. -- cgit v1.2.3