Browse Source

add templates for remaining authentication views

master
Fr3deric 6 years ago
parent
commit
57f521a034
  1. 6
      bam/templates/bam/password_change_done.html
  2. 32
      bam/templates/bam/password_reset.html
  3. 6
      bam/templates/bam/password_reset_complete.html
  4. 36
      bam/templates/bam/password_reset_confirm.html
  5. 5
      bam/templates/bam/password_reset_done.html
  6. 5
      bam/urls.py

6
bam/templates/bam/password_change_done.html

@ -0,0 +1,6 @@ @@ -0,0 +1,6 @@
{% extends "bam/base.html" %}
{% block content %}
<p><h1>Password Change</h1></p>
<p>Your password has been changed.</p>
{% endblock %}

32
bam/templates/bam/password_reset.html

@ -0,0 +1,32 @@ @@ -0,0 +1,32 @@
{% extends "bam/base.html" %}
{% block content-extra-head %}
<style>
.form-error {
color: #e9322d;
}
</style>
{% endblock %}
{% block content %}
<p><h1>Password Reset</h1></p>
<p>
<form method="post" action="{% url 'password_reset' %}" class="pure-form pure-form-aligned">
{% csrf_token %}
<fieldset>
{% for field in form %}
<div class="pure-control-group">
{{ field.label_tag }}
{{ field }}
{% for error in field.errors %}
<span class="pure-form-message form-error">{{ error }}</span>
{% endfor %}
</div>
{% endfor %}
<div class="pure-controls">
<button type="submit" class="pure-button pure-button-primary">Reset password</button>
</div>
<input type="hidden" name="next" value="{{ next }}">
</fieldset>
</form>
</p>
{% endblock %}

6
bam/templates/bam/password_reset_complete.html

@ -0,0 +1,6 @@ @@ -0,0 +1,6 @@
{% extends "bam/base.html" %}
{% block content %}
<p><h1>Password Reset</h1></p>
<p>Your password has been changed. Click <a href="{% url "login" %}">here</a> to log in.</p>
{% endblock %}

36
bam/templates/bam/password_reset_confirm.html

@ -0,0 +1,36 @@ @@ -0,0 +1,36 @@
{% extends "bam/base.html" %}
{% block content-extra-head %}
<style>
.form-error {
color: #e9322d;
}
</style>
{% endblock %}
{% block content %}
<p><h1>Password Reset</h1></p>
<p>
{% if validlink %}
<form method="post" action="" class="pure-form pure-form-aligned">
{% csrf_token %}
<fieldset>
{% for field in form %}
<div class="pure-control-group">
{{ field.label_tag }}
{{ field }}
{% for error in field.errors %}
<span class="pure-form-message form-error">{{ error }}</span>
{% endfor %}
</div>
{% endfor %}
<div class="pure-controls">
<button type="submit" class="pure-button pure-button-primary">Change password</button>
</div>
<input type="hidden" name="next" value="{{ next }}">
</fieldset>
</form>
{% else %}
Invalid password reset link.
{% endif %}
</p>
{% endblock %}

5
bam/templates/bam/password_reset_done.html

@ -0,0 +1,5 @@ @@ -0,0 +1,5 @@
{% extends "bam/base.html" %}
{% block content %}
<p><h1>Password Reset</h1></p>
Please check your mailbox.
{% endblock %}

5
bam/urls.py

@ -36,6 +36,11 @@ urlpatterns = [ @@ -36,6 +36,11 @@ urlpatterns = [
template_name='bam/password_reset_done.html'
),
name='password_reset_done'),
path('password_reset_confirm/<uidb64>/<token>/',
auth_views.PasswordResetConfirmView.as_view(
template_name='bam/password_reset_confirm.html'
),
name='password_reset_confirm'),
path('password_reset_confirm/',
auth_views.PasswordResetConfirmView.as_view(
template_name='bam/password_reset_confirm.html'

Loading…
Cancel
Save