Nové templaty pro heslo
This commit is contained in:
parent
018203604c
commit
8c9b62dbaa
5 changed files with 73 additions and 7 deletions
22
seminar/templates/seminar/registrace/nove_heslo.html
Normal file
22
seminar/templates/seminar/registrace/nove_heslo.html
Normal file
|
@ -0,0 +1,22 @@
|
|||
{% extends "base.html" %}
|
||||
{% block title %}Zadejte nové heslo{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>
|
||||
{% block nadpis1a %}{% block nadpis1b %}
|
||||
Zadejte nové heslo
|
||||
{% endblock %}{% endblock %}
|
||||
</h1>
|
||||
|
||||
<p>Zadejte dvakrát nové heslo. Tak ověříme, že bylo zadáno správně.</p>
|
||||
|
||||
|
||||
<form method="POST">
|
||||
{% csrf_token %}
|
||||
<table>
|
||||
{{ form.as_table }}
|
||||
</table>
|
||||
<input type="submit" value="Nastavit heslo!">
|
||||
</form>
|
||||
|
||||
{% endblock %}
|
15
seminar/templates/seminar/registrace/nove_nastaveno.html
Normal file
15
seminar/templates/seminar/registrace/nove_nastaveno.html
Normal file
|
@ -0,0 +1,15 @@
|
|||
{% extends "base.html" %}
|
||||
{% block title %}Heslo bylo nastaveno{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>
|
||||
{% block nadpis1a %}{% block nadpis1b %}
|
||||
Heslo bylo nastaveno
|
||||
{% endblock %}{% endblock %}
|
||||
</h1>
|
||||
|
||||
<p>Vaše heslo bylo nastaveno. Nyní se můžete přihlásit.</p>
|
||||
|
||||
<p><a href="{% url "login" %}">Přihlášení</a></p>
|
||||
|
||||
{% endblock %}
|
17
seminar/templates/seminar/registrace/reset_hesla.html
Normal file
17
seminar/templates/seminar/registrace/reset_hesla.html
Normal file
|
@ -0,0 +1,17 @@
|
|||
{% extends "base.html" %}
|
||||
{% block title %}Zapomněl jsi své heslo?{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>
|
||||
{% block nadpis1a %}{% block nadpis1b %}
|
||||
Zapomněl jsi své heslo?
|
||||
{% endblock %}{% endblock %}
|
||||
</h1>
|
||||
|
||||
<form method="POST">
|
||||
{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
<input type="submit" value="Pošli mi e-mail!">
|
||||
</form>
|
||||
|
||||
{% endblock %}
|
15
seminar/templates/seminar/registrace/reset_poslan.html
Normal file
15
seminar/templates/seminar/registrace/reset_poslan.html
Normal file
|
@ -0,0 +1,15 @@
|
|||
{% extends "base.html" %}
|
||||
{% block title %}Zpráva s obnovením hesla byla odeslána{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>
|
||||
{% block nadpis1a %}{% block nadpis1b %}
|
||||
Zpráva s obnovením hesla byla odeslána
|
||||
{% endblock %}{% endblock %}
|
||||
</h1>
|
||||
|
||||
<p>Návod na nastavení hesla byl odeslán na zadanou e-mailovou adresu, pokud účet s takovou adresou existuje. Měl by za okamžik dorazit.</p>
|
||||
|
||||
<p>Pokud e-mail neobdržíte, ujistěte se, že zadaná e-mailová adresa je stejná jako ta registrovaná u vašeho účtu a zkontrolujte složku nevyžádané pošty, tzv. spamu.</p>
|
||||
|
||||
{% endblock %}
|
|
@ -1286,8 +1286,7 @@ class LogoutView(auth_views.LogoutView):
|
|||
|
||||
class PasswordResetView(auth_views.PasswordResetView):
|
||||
""" Chci resetovat heslo. """
|
||||
#template_name = 'seminar/password_reset.html'
|
||||
# TODO: vlastní email_template_name a subject_template_name a html_email_template_name
|
||||
template_name = 'seminar/registrace/reset_hesla.html'
|
||||
success_url = reverse_lazy('reset_password_done')
|
||||
from_email = 'login@mam.mff.cuni.cz'
|
||||
email_template_name = 'seminar/registrace/password_reset_email.html'
|
||||
|
@ -1295,18 +1294,16 @@ class PasswordResetView(auth_views.PasswordResetView):
|
|||
|
||||
class PasswordResetDoneView(auth_views.PasswordResetDoneView):
|
||||
""" Poslali jsme e-mail (pokud bylo kam)). """
|
||||
#template_name = 'seminar/password_reset_done.html'
|
||||
pass
|
||||
template_name = 'seminar/registrace/reset_poslan.html'
|
||||
|
||||
class PasswordResetConfirmView(auth_views.PasswordResetConfirmView):
|
||||
""" Vymysli si heslo. """
|
||||
#template_name = 'seminar/password_confirm_done.html'
|
||||
template_name = 'seminar/registrace/nove_heslo.html'
|
||||
success_url = reverse_lazy('reset_password_complete')
|
||||
|
||||
class PasswordResetCompleteView(auth_views.PasswordResetCompleteView):
|
||||
""" Heslo se asi změnilo."""
|
||||
#template_name = 'seminar/password_complete_done.html'
|
||||
pass
|
||||
template_name = 'seminar/registrace/nove_nastaveno.html'
|
||||
|
||||
class PasswordChangeView(auth_views.PasswordChangeView):
|
||||
#template_name = 'seminar/password_change.html'
|
||||
|
|
Loading…
Reference in a new issue