mirror of
https://github.com/TrentSPalmer/trentpalmerdotorg.git
synced 2025-07-04 19:33:15 -07:00
add password reset
This commit is contained in:
13
accounts/templates/accounts/password_change_done.html
Normal file
13
accounts/templates/accounts/password_change_done.html
Normal file
@ -0,0 +1,13 @@
|
||||
{% extends "base.html" %}
|
||||
{% load i18n %}
|
||||
{% block content %}
|
||||
{% include "base_navbar.html" %}
|
||||
{% include "base_heading.html" %}
|
||||
|
||||
<div class="d-flex flex-column align-items-center">
|
||||
<p class="text-justify px-3">{% translate 'We’ve emailed you instructions for setting your password, if an account exists with the email you entered. You should receive them shortly.' %}</p>
|
||||
|
||||
<p class="text-justify px-3">{% translate 'If you don’t receive an email, please make sure you’ve entered the address you registered with, and check your spam folder.' %}</p>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
13
accounts/templates/accounts/password_reset_complete.html
Normal file
13
accounts/templates/accounts/password_reset_complete.html
Normal file
@ -0,0 +1,13 @@
|
||||
{% extends "base.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block content %}
|
||||
{% include "base_navbar.html" %}
|
||||
{% include "base_heading.html" %}
|
||||
|
||||
<p class="text-center">{% translate "Your password has been set." %}</p>
|
||||
<p class="text-center">{% translate "You may go ahead and log in now." %}</p>
|
||||
|
||||
<p class="text-center"><a href="{{ login_url }}">{% translate 'Log in' %}</a></p>
|
||||
|
||||
{% endblock %}
|
14
accounts/templates/accounts/password_reset_email.html
Normal file
14
accounts/templates/accounts/password_reset_email.html
Normal file
@ -0,0 +1,14 @@
|
||||
{% load i18n %}{% autoescape off %}
|
||||
{% blocktranslate %}You're receiving this email because you requested a password reset for your user account at {{ site_name }}.{% endblocktranslate %}
|
||||
|
||||
{% translate "Please go to the following page and choose a new password:" %}
|
||||
{% block reset_link %}
|
||||
{{ protocol }}://{{ domain }}{% url 'accounts:password_reset_confirm' uidb64=uid token=token %}
|
||||
{% endblock %}
|
||||
{% translate 'Your username, in case you’ve forgotten:' %} {{ user.get_username }}
|
||||
|
||||
{% translate "Thanks for using our site!" %}
|
||||
|
||||
{% blocktranslate %}The {{ site_name }} team{% endblocktranslate %}
|
||||
|
||||
{% endautoescape %}
|
40
accounts/templates/accounts/set_password_form.html
Normal file
40
accounts/templates/accounts/set_password_form.html
Normal file
@ -0,0 +1,40 @@
|
||||
{% extends "base.html" %}
|
||||
{% load i18n static %}
|
||||
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
{% block content %}
|
||||
{% include "base_navbar.html" %}
|
||||
|
||||
{% if validlink %}
|
||||
|
||||
<div class="container">
|
||||
<div class="row justify-content-center my-2 mx-0">
|
||||
<h1 class="text-center">Enter New Password</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<div class="d-flex flex-column offset-sm-3 col-sm-6 col-xs-12 px-0">
|
||||
<form method="POST">
|
||||
{% csrf_token %}
|
||||
{{ form | crispy }}
|
||||
<div class="mt-3">
|
||||
<input type="submit" class="btn btn-dark btn-lg" value="Change My Password">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% else %}
|
||||
|
||||
<div class="container">
|
||||
<div class="row justify-content-center my-2 mx-0">
|
||||
<h1 class="text-center">Error</h1>
|
||||
</div>
|
||||
</div>
|
||||
<p class="text-center">{% translate "The password reset link was invalid, possibly because it has already been used. Please request a new password reset." %}</p>
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
Reference in New Issue
Block a user