Browse Source

creation of all templates for reseting password

pull/250/head
Guillim 5 years ago
parent
commit
f29bf9b99d
7 changed files with 102 additions and 0 deletions
  1. 22
      app/authentification/templates/base_auth.html
  2. 9
      app/authentification/templates/password_reset_complete.html
  3. 25
      app/authentification/templates/password_reset_confirm.html
  4. 14
      app/authentification/templates/password_reset_done.html
  5. 12
      app/authentification/templates/password_reset_email.html
  6. 19
      app/authentification/templates/password_reset_form.html
  7. 1
      app/authentification/templates/password_reset_subject.txt

22
app/authentification/templates/base_auth.html

@ -0,0 +1,22 @@
{% extends 'base.html' %}
{% block content %}
<div class="hero-body">
<div class="container" style="max-width:600px">
<div class="card is-shady">
{% block content_auth %}{% endblock %}
<!-- <div class="card-image">
<figure class="image is-4by3">
<img src="https://source.unsplash.com/6Ticnhs1AG0" alt="Placeholder image">
</figure>
</div>
<div class="card-content">
<div class="content">
<h4>Language independent</h4>
<p>doccano is independent on any languages. You can annotate texts regardless of your languages. You can quickly start annotating text.</p>
</div>
</div> -->
</div>
</div>
</div>
{% endblock %}

9
app/authentification/templates/password_reset_complete.html

@ -0,0 +1,9 @@
{% extends "base_auth.html" %}
{% block content_auth %}
<div class="card-content">
<p>
Your password has been set. You may go ahead and <a href="{% url 'login' %}">sign in</a> now.
</p>
</div>
{% endblock %}

25
app/authentification/templates/password_reset_confirm.html

@ -0,0 +1,25 @@
{% extends "base_auth.html" %}
{% block content_auth %}
{% if validlink %}
<div class="card-content">
<div style="text-align:center;font-size:1.5em">
<h2>Change password</h2>
</div>
<form method="post">
{% csrf_token %}
{{ form.as_p }}
<div style="text-align:center">
<button type="submit" class="button is-link">Change password</button>
</div>
</form>
</div>
{% else %}
<div class="card-content">
The password reset link was invalid, possibly because it has already been used.
Please request a new password reset.
</div>
{% endif %}
{% endblock %}

14
app/authentification/templates/password_reset_done.html

@ -0,0 +1,14 @@
{% extends "base_auth.html" %}
{% block content_auth %}
<div class="card-content">
<p>
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>
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 %}

12
app/authentification/templates/password_reset_email.html

@ -0,0 +1,12 @@
{% autoescape off %}
To initiate the password reset process for your {{ user.get_username }} TestSite Account,
click the link below:
{{ protocol }}://{{ domain }}{% url 'password_reset_confirm' uidb64=uid token=token %}
If clicking the link above doesn't work, please copy and paste the URL in a new browser
window instead.
Sincerely,
The TestSite Team
{% endautoescape %}

19
app/authentification/templates/password_reset_form.html

@ -0,0 +1,19 @@
{% extends "base_auth.html" %}
{% load widget_tweaks %}
{% block content_auth %}
<div class="card-content">
<div style="text-align:center;font-size:1.5em">
<h2>Forgot password</h2>
</div>
<form method="post">
{% csrf_token %}
{{ form.as_p }}
<div style="text-align:center">
<button type="submit" class="button is-link">Submit</button>
</div>
</form>
</div>
{% endblock %}

1
app/authentification/templates/password_reset_subject.txt

@ -0,0 +1 @@
Password reset
Loading…
Cancel
Save