From f29bf9b99d2b0645c3c56a97c670d40213c60d59 Mon Sep 17 00:00:00 2001 From: Guillim Date: Mon, 17 Jun 2019 18:22:47 +0200 Subject: [PATCH] creation of all templates for reseting password --- app/authentification/templates/base_auth.html | 22 ++++++++++++++++ .../templates/password_reset_complete.html | 9 +++++++ .../templates/password_reset_confirm.html | 25 +++++++++++++++++++ .../templates/password_reset_done.html | 14 +++++++++++ .../templates/password_reset_email.html | 12 +++++++++ .../templates/password_reset_form.html | 19 ++++++++++++++ .../templates/password_reset_subject.txt | 1 + 7 files changed, 102 insertions(+) create mode 100644 app/authentification/templates/base_auth.html create mode 100644 app/authentification/templates/password_reset_complete.html create mode 100644 app/authentification/templates/password_reset_confirm.html create mode 100644 app/authentification/templates/password_reset_done.html create mode 100644 app/authentification/templates/password_reset_email.html create mode 100644 app/authentification/templates/password_reset_form.html create mode 100644 app/authentification/templates/password_reset_subject.txt diff --git a/app/authentification/templates/base_auth.html b/app/authentification/templates/base_auth.html new file mode 100644 index 00000000..2d1b6c75 --- /dev/null +++ b/app/authentification/templates/base_auth.html @@ -0,0 +1,22 @@ +{% extends 'base.html' %} + +{% block content %} +
+
+
+ {% block content_auth %}{% endblock %} + +
+
+
+{% endblock %} diff --git a/app/authentification/templates/password_reset_complete.html b/app/authentification/templates/password_reset_complete.html new file mode 100644 index 00000000..d4b800c3 --- /dev/null +++ b/app/authentification/templates/password_reset_complete.html @@ -0,0 +1,9 @@ +{% extends "base_auth.html" %} + +{% block content_auth %} +
+

+ Your password has been set. You may go ahead and sign in now. +

+
+{% endblock %} diff --git a/app/authentification/templates/password_reset_confirm.html b/app/authentification/templates/password_reset_confirm.html new file mode 100644 index 00000000..89314e24 --- /dev/null +++ b/app/authentification/templates/password_reset_confirm.html @@ -0,0 +1,25 @@ +{% extends "base_auth.html" %} + +{% block content_auth %} + {% if validlink %} +
+
+

Change password

+
+ +
+ {% csrf_token %} + {{ form.as_p }} +
+ +
+
+ +
+ {% else %} +
+ The password reset link was invalid, possibly because it has already been used. + Please request a new password reset. +
+ {% endif %} +{% endblock %} diff --git a/app/authentification/templates/password_reset_done.html b/app/authentification/templates/password_reset_done.html new file mode 100644 index 00000000..44dfad28 --- /dev/null +++ b/app/authentification/templates/password_reset_done.html @@ -0,0 +1,14 @@ +{% extends "base_auth.html" %} + +{% block content_auth %} +
+

+ We've emailed you instructions for setting your password, if an account exists with the email you entered. + You should receive them shortly. +

+

+ If you don't receive an email, please make sure you've entered the address you registered with, + and check your spam folder. +

+
+{% endblock %} diff --git a/app/authentification/templates/password_reset_email.html b/app/authentification/templates/password_reset_email.html new file mode 100644 index 00000000..80abaf06 --- /dev/null +++ b/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 %} diff --git a/app/authentification/templates/password_reset_form.html b/app/authentification/templates/password_reset_form.html new file mode 100644 index 00000000..78295d27 --- /dev/null +++ b/app/authentification/templates/password_reset_form.html @@ -0,0 +1,19 @@ +{% extends "base_auth.html" %} + +{% load widget_tweaks %} +{% block content_auth %} +
+
+

Forgot password

+
+ +
+ {% csrf_token %} + {{ form.as_p }} +
+ +
+
+ +
+{% endblock %} diff --git a/app/authentification/templates/password_reset_subject.txt b/app/authentification/templates/password_reset_subject.txt new file mode 100644 index 00000000..63a3e5a5 --- /dev/null +++ b/app/authentification/templates/password_reset_subject.txt @@ -0,0 +1 @@ +Password reset