diff options
author | Andrew Godwin | 2022-11-17 19:16:34 -0700 |
---|---|---|
committer | Andrew Godwin | 2022-11-17 19:16:34 -0700 |
commit | 6adfdbabe0d44c17f32abc9d48a6e252e2a0792e (patch) | |
tree | 6644c5eeab7970a9f9b8d9540b7ebe28cc499331 /templates | |
parent | 2a3690d1c148da5dd799052403ba7290e1fb7de0 (diff) | |
download | takahe-6adfdbabe0d44c17f32abc9d48a6e252e2a0792e.tar.gz takahe-6adfdbabe0d44c17f32abc9d48a6e252e2a0792e.tar.bz2 takahe-6adfdbabe0d44c17f32abc9d48a6e252e2a0792e.zip |
Add signup and password reset
Diffstat (limited to 'templates')
-rw-r--r-- | templates/activities/_menu.html | 4 | ||||
-rw-r--r-- | templates/auth/reset.html | 20 | ||||
-rw-r--r-- | templates/auth/reset_success.html | 14 | ||||
-rw-r--r-- | templates/auth/signup.html | 18 | ||||
-rw-r--r-- | templates/auth/signup_success.html | 15 | ||||
-rw-r--r-- | templates/emails/new_account.txt | 8 | ||||
-rw-r--r-- | templates/emails/password_reset.txt | 8 |
7 files changed, 85 insertions, 2 deletions
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 @@ <i class="fa-solid fa-gear"></i> Settings </a> {% else %} - <a href="/local/" {% if current_page == "local" %}class="selected"{% endif %}> + <a href="{% url "local" %}" {% if current_page == "local" %}class="selected"{% endif %}> <i class="fa-solid fa-city"></i> Local Posts </a> <h3></h3> - <a href="/auth/signup/" {% if current_page == "signup" %}class="selected"{% endif %}> + <a href="{% url "signup" %}" {% if current_page == "signup" %}class="selected"{% endif %}> <i class="fa-solid fa-user-plus"></i> Create Account </a> {% 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 %} + <form action="." method="POST"> + {% csrf_token %} + <fieldset> + <legend>Reset Password</legend> + <p>You are resetting your password for {{ reset.user.email }}.</p> + <p>Please choose your new password below.</p> + {% for field in form %} + {% include "forms/_field.html" %} + {% endfor %} + </fieldset> + <div class="buttons"> + <button>Reset</button> + </div> + </form> +{% 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 %} + <form> + <fieldset> + <legend>Password Reset</legend> + <p> + Your password for <tt>{{ email }}</tt> has been reset! + </p> + </fieldset> + </form> +{% 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 %} + <form action="." method="POST"> + {% csrf_token %} + <fieldset> + <legend>Create An Account</legend> + {% for field in form %} + {% include "forms/_field.html" %} + {% endfor %} + </fieldset> + <div class="buttons"> + <button>Create</button> + </div> + </form> +{% 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 %} + <form> + <fieldset> + <legend>Email Sent</legend> + <p> + An email has been sent to <tt>{{ email }}</tt> - please follow + the link inside to finish creating your account. + </p> + </fieldset> + </form> +{% 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. |