From 5d43e4b3bb7d4c7c47ab4256fdc8a2c0b6d5ba4b Mon Sep 17 00:00:00 2001 From: janek37 <none@none> Date: Tue, 10 Sep 2013 15:12:15 +0200 Subject: [PATCH] poprawione zasłanianie szablonów --- accounts/forms.py | 2 +- accounts/templates/registration/activate.html | 14 -------------- accounts/templates/registration/activation_email.txt | 5 ----- accounts/templates/registration/activation_email_subject.txt | 1 - accounts/templates/registration/login.html | 37 ------------------------------------- accounts/templates/registration/logout.html | 11 ----------- accounts/templates/registration/password_change_done.html | 16 ---------------- accounts/templates/registration/password_change_form.html | 59 ----------------------------------------------------------- accounts/templates/registration/password_reset_complete.html | 14 -------------- accounts/templates/registration/password_reset_confirm.html | 36 ------------------------------------ accounts/templates/registration/password_reset_done.html | 12 ------------ accounts/templates/registration/password_reset_email.html | 21 --------------------- accounts/templates/registration/password_reset_form.html | 19 ------------------- accounts/templates/registration/registration_complete.html | 7 ------- accounts/templates/registration/registration_form.html | 43 ------------------------------------------- templates/registration/activate.html | 14 ++++++++++++++ templates/registration/activation_email.txt | 5 +++++ templates/registration/activation_email_subject.txt | 1 + templates/registration/login.html | 37 +++++++++++++++++++++++++++++++++++++ templates/registration/logout.html | 11 +++++++++++ templates/registration/password_change_done.html | 16 ++++++++++++++++ templates/registration/password_change_form.html | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ templates/registration/password_reset_complete.html | 14 ++++++++++++++ templates/registration/password_reset_confirm.html | 36 ++++++++++++++++++++++++++++++++++++ templates/registration/password_reset_done.html | 12 ++++++++++++ templates/registration/password_reset_email.html | 21 +++++++++++++++++++++ templates/registration/password_reset_form.html | 19 +++++++++++++++++++ templates/registration/registration_complete.html | 7 +++++++ templates/registration/registration_form.html | 43 +++++++++++++++++++++++++++++++++++++++++++ 29 files changed, 296 insertions(+), 296 deletions(-) delete mode 100644 accounts/templates/registration/activate.html delete mode 100644 accounts/templates/registration/activation_email.txt delete mode 100644 accounts/templates/registration/activation_email_subject.txt delete mode 100644 accounts/templates/registration/login.html delete mode 100644 accounts/templates/registration/logout.html delete mode 100644 accounts/templates/registration/password_change_done.html delete mode 100644 accounts/templates/registration/password_change_form.html delete mode 100644 accounts/templates/registration/password_reset_complete.html delete mode 100644 accounts/templates/registration/password_reset_confirm.html delete mode 100644 accounts/templates/registration/password_reset_done.html delete mode 100644 accounts/templates/registration/password_reset_email.html delete mode 100644 accounts/templates/registration/password_reset_form.html delete mode 100644 accounts/templates/registration/registration_complete.html delete mode 100644 accounts/templates/registration/registration_form.html create mode 100644 templates/registration/activate.html create mode 100644 templates/registration/activation_email.txt create mode 100644 templates/registration/activation_email_subject.txt create mode 100644 templates/registration/login.html create mode 100644 templates/registration/logout.html create mode 100644 templates/registration/password_change_done.html create mode 100644 templates/registration/password_change_form.html create mode 100644 templates/registration/password_reset_complete.html create mode 100644 templates/registration/password_reset_confirm.html create mode 100644 templates/registration/password_reset_done.html create mode 100644 templates/registration/password_reset_email.html create mode 100644 templates/registration/password_reset_form.html create mode 100644 templates/registration/registration_complete.html create mode 100644 templates/registration/registration_form.html diff --git a/accounts/forms.py b/accounts/forms.py index 765843f..e2c91c7 100644 --- a/accounts/forms.py +++ b/accounts/forms.py @@ -19,7 +19,7 @@ class AddUserForm(ModelForm): fakeform = PasswordResetForm(data={'email': user.email}) if fakeform.is_valid(): # oczywiście, że jest domain = get_current_site(request).domain - fakeform.save(request=request, from_email='webmaster@'+domain) + fakeform.save(request=request) UserSettings.objects.create(user=user) user.groups.add(*self.cleaned_data['groups']) return user diff --git a/accounts/templates/registration/activate.html b/accounts/templates/registration/activate.html deleted file mode 100644 index 155e119..0000000 --- a/accounts/templates/registration/activate.html +++ /dev/null @@ -1,14 +0,0 @@ -{% extends "base.html" %} -{% load i18n %} -{% load url from future %} - -{% block content %} - - {% blocktrans %} - <h1>Activation</h1> - <p>Your account is now activated. Go <a href="{% url 'main' %}">here</a> - to continue.</p> - - {% endblocktrans %} - -{% endblock %} diff --git a/accounts/templates/registration/activation_email.txt b/accounts/templates/registration/activation_email.txt deleted file mode 100644 index b90fe09..0000000 --- a/accounts/templates/registration/activation_email.txt +++ /dev/null @@ -1,5 +0,0 @@ -Hi, - -Thank you for your registration. To activate your account click on the link below : - -<a href="{% url registration_activate activation_key %}">{% url registration_activate activation_key %}</a>. diff --git a/accounts/templates/registration/activation_email_subject.txt b/accounts/templates/registration/activation_email_subject.txt deleted file mode 100644 index ed8a3a9..0000000 --- a/accounts/templates/registration/activation_email_subject.txt +++ /dev/null @@ -1 +0,0 @@ -{{ site }}. Confirm your registration \ No newline at end of file diff --git a/accounts/templates/registration/login.html b/accounts/templates/registration/login.html deleted file mode 100644 index d4ffc9d..0000000 --- a/accounts/templates/registration/login.html +++ /dev/null @@ -1,37 +0,0 @@ -{% extends "base.html" %} -{% load i18n %} -{% load url from future %} - -{% block content %} - {% if form.errors and not form.non_field_errors and not form.this_is_the_login_form.errors %} - <p class="errornote"> - {% blocktrans count form.errors.items|length as counter %}Please - correct the error below.{% plural %}Please correct the errors - below.{% endblocktrans %} - </p> - {% endif %} - - {% if form.non_field_errors or form.this_is_the_login_form.errors %} - {% for error in form.non_field_errors|add:form.this_is_the_login_form.errors %} - <p class="errornote"> - {{ error }} - </p> - {% endfor %} - {% endif %} - - <div id="content-main"> - <form action="" method="post" id="login-form">{% csrf_token %} - {{ form.as_p }} - <div class="submit-row"> - <label> </label><input type="submit" - value="{% trans 'Log in' %}"/> - </div> - </form> - - <a href="{% url 'auth_password_reset' %}">Nie pamiętam hasła</a> - - <script type="text/javascript"> - document.getElementById('id_username').focus() - </script> - </div> -{% endblock %} diff --git a/accounts/templates/registration/logout.html b/accounts/templates/registration/logout.html deleted file mode 100644 index ae611f5..0000000 --- a/accounts/templates/registration/logout.html +++ /dev/null @@ -1,11 +0,0 @@ -{% extends "base.html" %} -{% load i18n %} -{% load url from future %} - -{% block content %} - - <p>{% trans "Thanks for spending some quality time with the Web site today." %}</p> - - <p><a href="{% url 'auth_login' %}">{% trans 'Log in again' %}</a></p> - -{% endblock %} diff --git a/accounts/templates/registration/password_change_done.html b/accounts/templates/registration/password_change_done.html deleted file mode 100644 index 3747246..0000000 --- a/accounts/templates/registration/password_change_done.html +++ /dev/null @@ -1,16 +0,0 @@ -{% extends "base.html" %} -{% load i18n %} -{% load url from future %} - -{% block userlinks %}{% trans 'Change password' %} / - <a href="{% url 'auth_logout' %}">{% trans 'Log out' %}</a>{% endblock %} - -{% block title %}{% trans 'Password change successful' %}{% endblock %} - -{% block content %} - - <h1>{% trans 'Password change successful' %}</h1> - - <p>{% trans 'Your password was changed.' %}</p> - -{% endblock %} diff --git a/accounts/templates/registration/password_change_form.html b/accounts/templates/registration/password_change_form.html deleted file mode 100644 index 8790991..0000000 --- a/accounts/templates/registration/password_change_form.html +++ /dev/null @@ -1,59 +0,0 @@ -{% extends "base.html" %} -{% load i18n %} -{% load url from future %} -{% block userlinks %}{% trans 'Change password' %} / - <a href="{% url 'auth_logout' %}">{% trans 'Log out' %}</a>{% endblock %} - -{% block title %}{% trans 'Password change' %}{% endblock %} - -{% block content %} - <div id="content-main"> - - <form action="" method="post">{% csrf_token %} - <div> - {% if form.errors %} - <p class="errornote"> - {% blocktrans count form.errors.items|length as counter %} - Please correct the error below.{% plural %}Please - correct the errors below.{% endblocktrans %} - </p> - {% endif %} - - <h1>{% trans 'Password change' %}</h1> - - <p>{% trans "Please enter your old password, for security's sake, and then enter your new password twice so we can verify you typed it in correctly." %}</p> - - <fieldset class="module aligned wide"> - - <div class="form-row"> - {{ form.old_password.errors }} - <label for="id_old_password" - class="required">{% trans 'Old password' %}:</label>{{ form.old_password }} - </div> - - <div class="form-row"> - {{ form.new_password1.errors }} - <label for="id_new_password1" - class="required">{% trans 'New password' %}:</label>{{ form.new_password1 }} - </div> - - <div class="form-row"> - {{ form.new_password2.errors }} - <label for="id_new_password2" - class="required">{% trans 'Password (again)' %}:</label>{{ form.new_password2 }} - </div> - - </fieldset> - - <div class="submit-row"> - <input type="submit" - value="{% trans 'Change my password' %}" - class="default"/> - </div> - - <script type="text/javascript">document.getElementById("id_old_password").focus();</script> - </div> - </form> - </div> - -{% endblock %} diff --git a/accounts/templates/registration/password_reset_complete.html b/accounts/templates/registration/password_reset_complete.html deleted file mode 100644 index 63565a3..0000000 --- a/accounts/templates/registration/password_reset_complete.html +++ /dev/null @@ -1,14 +0,0 @@ -{% extends "base.html" %} -{% load i18n %} - -{% block title %}{% trans 'Password reset complete' %}{% endblock %} - -{% block content %} - - <h1>{% trans 'Password reset complete' %}</h1> - - <p>{% trans "Your password has been set. You may go ahead and log in now." %}</p> - - <p><a href="{{ login_url }}">{% trans 'Log in' %}</a></p> - -{% endblock %} diff --git a/accounts/templates/registration/password_reset_confirm.html b/accounts/templates/registration/password_reset_confirm.html deleted file mode 100644 index 41d22ee..0000000 --- a/accounts/templates/registration/password_reset_confirm.html +++ /dev/null @@ -1,36 +0,0 @@ -{% extends "base.html" %} -{% load i18n %} - -{% block title %}{% trans 'Password reset' %}{% endblock %} - -{% block content %} - - {% if validlink %} - - <h1>{% trans 'Enter new password' %}</h1> - - <p>{% trans "Please enter your new password twice so we can verify you typed it in correctly." %}</p> - - <form action="" method="post">{% csrf_token %} - {{ form.new_password1.errors }} - <p class="aligned wide"><label - for="id_new_password1">{% trans 'New password:' %}</label>{{ form.new_password1 }} - </p> - {{ form.new_password2.errors }} - <p class="aligned wide"><label - for="id_new_password2">{% trans 'Confirm password:' %}</label>{{ form.new_password2 }} - </p> - - <p><input type="submit" value="{% trans 'Change my password' %}"/> - </p> - </form> - - {% else %} - - <h1>{% trans 'Password reset unsuccessful' %}</h1> - - <p>{% trans "The password reset link was invalid, possibly because it has already been used. Please request a new password reset." %}</p> - - {% endif %} - -{% endblock %} diff --git a/accounts/templates/registration/password_reset_done.html b/accounts/templates/registration/password_reset_done.html deleted file mode 100644 index bd14f94..0000000 --- a/accounts/templates/registration/password_reset_done.html +++ /dev/null @@ -1,12 +0,0 @@ -{% extends "base.html" %} -{% load i18n %} - -{% block title %}{% trans 'Password reset successful' %}{% endblock %} - -{% block content %} - - <h1>{% trans 'Password reset successful' %}</h1> - - <p>{% trans "We've e-mailed you instructions for setting your password to the e-mail address you submitted. You should be receiving it shortly." %}</p> - -{% endblock %} diff --git a/accounts/templates/registration/password_reset_email.html b/accounts/templates/registration/password_reset_email.html deleted file mode 100644 index f93ad72..0000000 --- a/accounts/templates/registration/password_reset_email.html +++ /dev/null @@ -1,21 +0,0 @@ -{% load i18n %}{% load url from future %}{% autoescape off %} - - Szanowny Użytkowniku! - - Ten list jest częścią procedury ustanawiania lub zmiany hasła w systemie - Kuźnia. - Jeżeli fakt, że masz konto w systemie Kuźnia jest dla Ciebie - zaskoczeniem, zechciej ten list uznać za doniesienie, że właśnie - założyliśmy Ci konto. - - Aby wprowadzić nowe hasło, przejdź na następującą stronę: - {% block reset_link %} - {{ protocol }}:// - {{ domain }}{% url 'django.contrib.auth.views.password_reset_confirm' uidb36=uid token=token %} - {% endblock %} - - Twoja nazwa użytkownika: {{ user.username }} - - Z wyrazami szacunku - Zespół Kuźni -{% endautoescape %} diff --git a/accounts/templates/registration/password_reset_form.html b/accounts/templates/registration/password_reset_form.html deleted file mode 100644 index bdf9f1b..0000000 --- a/accounts/templates/registration/password_reset_form.html +++ /dev/null @@ -1,19 +0,0 @@ -{% extends "base.html" %} -{% load i18n %} - -{% block title %}{% trans "Password reset" %}{% endblock %} - -{% block content %} - - <h1>{% trans "Password reset" %}</h1> - - <p>{% trans "Forgotten your password? Enter your e-mail address below, and we'll e-mail instructions for setting a new one." %}</p> - - <form action="" method="post">{% csrf_token %} - {{ form.email.errors }} - <p><label - for="id_email">{% trans 'E-mail address:' %}</label> {{ form.email }} - <input type="submit" value="{% trans 'Reset my password' %}"/></p> - </form> - -{% endblock %} diff --git a/accounts/templates/registration/registration_complete.html b/accounts/templates/registration/registration_complete.html deleted file mode 100644 index a460c34..0000000 --- a/accounts/templates/registration/registration_complete.html +++ /dev/null @@ -1,7 +0,0 @@ -{% extends "base.html" %} -{% load i18n %} - -{% block content %} - <h1>Rejestracja zakończona</h1> - <p>Pomyślnie dodano użytkownika, wysłano email.</p> -{% endblock %} diff --git a/accounts/templates/registration/registration_form.html b/accounts/templates/registration/registration_form.html deleted file mode 100644 index fd7d89f..0000000 --- a/accounts/templates/registration/registration_form.html +++ /dev/null @@ -1,43 +0,0 @@ -{% extends "base.html" %} -{% load i18n %} -{% load url from future %} - -{% block extrahead %} - <style> - label { - vertical-align: top; - width: 100px; - display: inline-block; - } - </style> -{% endblock %} - -{% block title %}{% trans 'Registration' %}{% endblock %} - -{% block content %} - <div id="content-main"> - - <form action="" method="post">{% csrf_token %} - <div> - {% if form.errors %} - <p class="errornote"> - {% blocktrans count form.errors.items|length as counter %} - Please correct the error below.{% plural %}Please - correct the errors below.{% endblocktrans %} - </p> - {% endif %} - - <h1>{% trans 'Registration' %}</h1> - - {{ form.as_p }} - - <div class="submit-row"> - <input type="submit" value="{% trans 'Add user' %}" - class="default"/> - </div> - - </div> - </form> - </div> - -{% endblock %} diff --git a/templates/registration/activate.html b/templates/registration/activate.html new file mode 100644 index 0000000..155e119 --- /dev/null +++ b/templates/registration/activate.html @@ -0,0 +1,14 @@ +{% extends "base.html" %} +{% load i18n %} +{% load url from future %} + +{% block content %} + + {% blocktrans %} + <h1>Activation</h1> + <p>Your account is now activated. Go <a href="{% url 'main' %}">here</a> + to continue.</p> + + {% endblocktrans %} + +{% endblock %} diff --git a/templates/registration/activation_email.txt b/templates/registration/activation_email.txt new file mode 100644 index 0000000..b90fe09 --- /dev/null +++ b/templates/registration/activation_email.txt @@ -0,0 +1,5 @@ +Hi, + +Thank you for your registration. To activate your account click on the link below : + +<a href="{% url registration_activate activation_key %}">{% url registration_activate activation_key %}</a>. diff --git a/templates/registration/activation_email_subject.txt b/templates/registration/activation_email_subject.txt new file mode 100644 index 0000000..ed8a3a9 --- /dev/null +++ b/templates/registration/activation_email_subject.txt @@ -0,0 +1 @@ +{{ site }}. Confirm your registration \ No newline at end of file diff --git a/templates/registration/login.html b/templates/registration/login.html new file mode 100644 index 0000000..d4ffc9d --- /dev/null +++ b/templates/registration/login.html @@ -0,0 +1,37 @@ +{% extends "base.html" %} +{% load i18n %} +{% load url from future %} + +{% block content %} + {% if form.errors and not form.non_field_errors and not form.this_is_the_login_form.errors %} + <p class="errornote"> + {% blocktrans count form.errors.items|length as counter %}Please + correct the error below.{% plural %}Please correct the errors + below.{% endblocktrans %} + </p> + {% endif %} + + {% if form.non_field_errors or form.this_is_the_login_form.errors %} + {% for error in form.non_field_errors|add:form.this_is_the_login_form.errors %} + <p class="errornote"> + {{ error }} + </p> + {% endfor %} + {% endif %} + + <div id="content-main"> + <form action="" method="post" id="login-form">{% csrf_token %} + {{ form.as_p }} + <div class="submit-row"> + <label> </label><input type="submit" + value="{% trans 'Log in' %}"/> + </div> + </form> + + <a href="{% url 'auth_password_reset' %}">Nie pamiętam hasła</a> + + <script type="text/javascript"> + document.getElementById('id_username').focus() + </script> + </div> +{% endblock %} diff --git a/templates/registration/logout.html b/templates/registration/logout.html new file mode 100644 index 0000000..ae611f5 --- /dev/null +++ b/templates/registration/logout.html @@ -0,0 +1,11 @@ +{% extends "base.html" %} +{% load i18n %} +{% load url from future %} + +{% block content %} + + <p>{% trans "Thanks for spending some quality time with the Web site today." %}</p> + + <p><a href="{% url 'auth_login' %}">{% trans 'Log in again' %}</a></p> + +{% endblock %} diff --git a/templates/registration/password_change_done.html b/templates/registration/password_change_done.html new file mode 100644 index 0000000..3747246 --- /dev/null +++ b/templates/registration/password_change_done.html @@ -0,0 +1,16 @@ +{% extends "base.html" %} +{% load i18n %} +{% load url from future %} + +{% block userlinks %}{% trans 'Change password' %} / + <a href="{% url 'auth_logout' %}">{% trans 'Log out' %}</a>{% endblock %} + +{% block title %}{% trans 'Password change successful' %}{% endblock %} + +{% block content %} + + <h1>{% trans 'Password change successful' %}</h1> + + <p>{% trans 'Your password was changed.' %}</p> + +{% endblock %} diff --git a/templates/registration/password_change_form.html b/templates/registration/password_change_form.html new file mode 100644 index 0000000..8790991 --- /dev/null +++ b/templates/registration/password_change_form.html @@ -0,0 +1,59 @@ +{% extends "base.html" %} +{% load i18n %} +{% load url from future %} +{% block userlinks %}{% trans 'Change password' %} / + <a href="{% url 'auth_logout' %}">{% trans 'Log out' %}</a>{% endblock %} + +{% block title %}{% trans 'Password change' %}{% endblock %} + +{% block content %} + <div id="content-main"> + + <form action="" method="post">{% csrf_token %} + <div> + {% if form.errors %} + <p class="errornote"> + {% blocktrans count form.errors.items|length as counter %} + Please correct the error below.{% plural %}Please + correct the errors below.{% endblocktrans %} + </p> + {% endif %} + + <h1>{% trans 'Password change' %}</h1> + + <p>{% trans "Please enter your old password, for security's sake, and then enter your new password twice so we can verify you typed it in correctly." %}</p> + + <fieldset class="module aligned wide"> + + <div class="form-row"> + {{ form.old_password.errors }} + <label for="id_old_password" + class="required">{% trans 'Old password' %}:</label>{{ form.old_password }} + </div> + + <div class="form-row"> + {{ form.new_password1.errors }} + <label for="id_new_password1" + class="required">{% trans 'New password' %}:</label>{{ form.new_password1 }} + </div> + + <div class="form-row"> + {{ form.new_password2.errors }} + <label for="id_new_password2" + class="required">{% trans 'Password (again)' %}:</label>{{ form.new_password2 }} + </div> + + </fieldset> + + <div class="submit-row"> + <input type="submit" + value="{% trans 'Change my password' %}" + class="default"/> + </div> + + <script type="text/javascript">document.getElementById("id_old_password").focus();</script> + </div> + </form> + </div> + +{% endblock %} diff --git a/templates/registration/password_reset_complete.html b/templates/registration/password_reset_complete.html new file mode 100644 index 0000000..63565a3 --- /dev/null +++ b/templates/registration/password_reset_complete.html @@ -0,0 +1,14 @@ +{% extends "base.html" %} +{% load i18n %} + +{% block title %}{% trans 'Password reset complete' %}{% endblock %} + +{% block content %} + + <h1>{% trans 'Password reset complete' %}</h1> + + <p>{% trans "Your password has been set. You may go ahead and log in now." %}</p> + + <p><a href="{{ login_url }}">{% trans 'Log in' %}</a></p> + +{% endblock %} diff --git a/templates/registration/password_reset_confirm.html b/templates/registration/password_reset_confirm.html new file mode 100644 index 0000000..41d22ee --- /dev/null +++ b/templates/registration/password_reset_confirm.html @@ -0,0 +1,36 @@ +{% extends "base.html" %} +{% load i18n %} + +{% block title %}{% trans 'Password reset' %}{% endblock %} + +{% block content %} + + {% if validlink %} + + <h1>{% trans 'Enter new password' %}</h1> + + <p>{% trans "Please enter your new password twice so we can verify you typed it in correctly." %}</p> + + <form action="" method="post">{% csrf_token %} + {{ form.new_password1.errors }} + <p class="aligned wide"><label + for="id_new_password1">{% trans 'New password:' %}</label>{{ form.new_password1 }} + </p> + {{ form.new_password2.errors }} + <p class="aligned wide"><label + for="id_new_password2">{% trans 'Confirm password:' %}</label>{{ form.new_password2 }} + </p> + + <p><input type="submit" value="{% trans 'Change my password' %}"/> + </p> + </form> + + {% else %} + + <h1>{% trans 'Password reset unsuccessful' %}</h1> + + <p>{% trans "The password reset link was invalid, possibly because it has already been used. Please request a new password reset." %}</p> + + {% endif %} + +{% endblock %} diff --git a/templates/registration/password_reset_done.html b/templates/registration/password_reset_done.html new file mode 100644 index 0000000..bd14f94 --- /dev/null +++ b/templates/registration/password_reset_done.html @@ -0,0 +1,12 @@ +{% extends "base.html" %} +{% load i18n %} + +{% block title %}{% trans 'Password reset successful' %}{% endblock %} + +{% block content %} + + <h1>{% trans 'Password reset successful' %}</h1> + + <p>{% trans "We've e-mailed you instructions for setting your password to the e-mail address you submitted. You should be receiving it shortly." %}</p> + +{% endblock %} diff --git a/templates/registration/password_reset_email.html b/templates/registration/password_reset_email.html new file mode 100644 index 0000000..f93ad72 --- /dev/null +++ b/templates/registration/password_reset_email.html @@ -0,0 +1,21 @@ +{% load i18n %}{% load url from future %}{% autoescape off %} + + Szanowny Użytkowniku! + + Ten list jest częścią procedury ustanawiania lub zmiany hasła w systemie + Kuźnia. + Jeżeli fakt, że masz konto w systemie Kuźnia jest dla Ciebie + zaskoczeniem, zechciej ten list uznać za doniesienie, że właśnie + założyliśmy Ci konto. + + Aby wprowadzić nowe hasło, przejdź na następującą stronę: + {% block reset_link %} + {{ protocol }}:// + {{ domain }}{% url 'django.contrib.auth.views.password_reset_confirm' uidb36=uid token=token %} + {% endblock %} + + Twoja nazwa użytkownika: {{ user.username }} + + Z wyrazami szacunku + Zespół Kuźni +{% endautoescape %} diff --git a/templates/registration/password_reset_form.html b/templates/registration/password_reset_form.html new file mode 100644 index 0000000..bdf9f1b --- /dev/null +++ b/templates/registration/password_reset_form.html @@ -0,0 +1,19 @@ +{% extends "base.html" %} +{% load i18n %} + +{% block title %}{% trans "Password reset" %}{% endblock %} + +{% block content %} + + <h1>{% trans "Password reset" %}</h1> + + <p>{% trans "Forgotten your password? Enter your e-mail address below, and we'll e-mail instructions for setting a new one." %}</p> + + <form action="" method="post">{% csrf_token %} + {{ form.email.errors }} + <p><label + for="id_email">{% trans 'E-mail address:' %}</label> {{ form.email }} + <input type="submit" value="{% trans 'Reset my password' %}"/></p> + </form> + +{% endblock %} diff --git a/templates/registration/registration_complete.html b/templates/registration/registration_complete.html new file mode 100644 index 0000000..a460c34 --- /dev/null +++ b/templates/registration/registration_complete.html @@ -0,0 +1,7 @@ +{% extends "base.html" %} +{% load i18n %} + +{% block content %} + <h1>Rejestracja zakończona</h1> + <p>Pomyślnie dodano użytkownika, wysłano email.</p> +{% endblock %} diff --git a/templates/registration/registration_form.html b/templates/registration/registration_form.html new file mode 100644 index 0000000..fd7d89f --- /dev/null +++ b/templates/registration/registration_form.html @@ -0,0 +1,43 @@ +{% extends "base.html" %} +{% load i18n %} +{% load url from future %} + +{% block extrahead %} + <style> + label { + vertical-align: top; + width: 100px; + display: inline-block; + } + </style> +{% endblock %} + +{% block title %}{% trans 'Registration' %}{% endblock %} + +{% block content %} + <div id="content-main"> + + <form action="" method="post">{% csrf_token %} + <div> + {% if form.errors %} + <p class="errornote"> + {% blocktrans count form.errors.items|length as counter %} + Please correct the error below.{% plural %}Please + correct the errors below.{% endblocktrans %} + </p> + {% endif %} + + <h1>{% trans 'Registration' %}</h1> + + {{ form.as_p }} + + <div class="submit-row"> + <input type="submit" value="{% trans 'Add user' %}" + class="default"/> + </div> + + </div> + </form> + </div> + +{% endblock %} -- libgit2 0.22.2