Commits

Kai Diefenbach committed b2558b0

Enhancement: cleaned up password reset templates

  • Participants
  • Parent commits ac9e9a3

Comments (0)

Files changed (7)

lfstheme/static/css/main.css

     padding-bottom: 10px;
 }
 
-ul.errorlist {
-    padding: 0;
+.middle-slot ul.errorlist {
+    padding: 2px 0 0 0;
     margin: 0;
+    color: red;
+}
+
+.middle-slot ul.errorlist li {
     list-style-type: none;
-    color: red;
 }
 
 tr.error td {

lfstheme/templates/lfs/shop/lfs_form.html

         
         {% if field.errors %}
             <div class="error">
+                {{ field }}
                 {{ field.errors }}
-                {{ field }}
             </div>
         {% else %}
             <div>

lfstheme/templates/registration/password_reset_complete.html

 
 {% 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 }}?next={% url lfs_shop_view %}">{% trans 'Log in' %}</a></p>
+    <h1>{% trans 'Password reset complete' %}</h1>
+    <p>{% trans "Your password has been set. You may go ahead and log in now." %}</p>    
+    <br>
+    <p><a href="{{ login_url }}?next={% url lfs_shop_view %}">{% trans 'Login' %}</a></p>
 
 {% endblock %}

lfstheme/templates/registration/password_reset_confirm.html

 
 {% 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">
-{{ 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." %}
-
-{% endif %}
+    {% 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">
+            {% include "lfs/shop/lfs_form.html" %}
+            <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." %}
+    {% endif %}
 
 {% endblock %}

lfstheme/templates/registration/password_reset_done.html

 {% extends "lfs/base.html" %}
 {% load i18n %}
+{% load lfs_tags %}
 
-{% block section %}{% endblock %}
-{% block left-slot-wrapper%}{% endblock %}
-{% block right-slot-wrapper%}{% endblock %}
+{% block title %}{% trans 'Password reset successful' %}{% endblock %}
+{% block section %}password-reset{% endblock %}
 
 {% block breadcrumbs %}
-    <ul class="breadcrumbs">
-        <li>{% trans 'You are here:' %}</li>
-        <li>
-            <a href="{% url lfs_shop_view %}">
-                {% trans 'Home' %}</a> &gt;
-        </li>
-        <li>
-            {% trans 'Password reset successful' %}
-        </li>
-    </ul>    
+    {% breadcrumbs _("Password reset successful") %}
 {% endblock %}
 
-
-{% 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>
-
+    <h1 class="first-heading">{% 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 %}

lfstheme/templates/registration/password_reset_email.html

-{% load i18n %}{% autoescape off %}
+{% load i18n %}
+{% autoescape off %}
 {% trans "You're receiving this e-mail because you requested a password reset" %}
 {% blocktrans %}for your user account at {{ site_name }}{% endblocktrans %}.
 

lfstheme/templates/registration/password_reset_form.html

 {% extends "lfs/base.html" %}
 {% load i18n %}
+{% load lfs_tags %}
 
 {% block title %}{% trans "Password reset" %}{% endblock %}
-{% block section %}{% endblock %}
-{% block left-slot-wrapper%}{% endblock %}
-{% block right-slot-wrapper%}{% endblock %}
+{% block section %}password-reset{% endblock %}
 
 {% block breadcrumbs %}
-    <ul class="breadcrumbs">
-        <li>{% trans 'You are here:' %}</li>
-        <li>
-            <a href="{% url lfs_shop_view %}">
-                {% trans 'Home' %}</a> &gt;
-        </li>
-        <li>
-            {% trans 'Password reset' %}
-        </li>
-    </ul>    
+    {% breadcrumbs _("Password reset") %}
 {% endblock %}
 
 {% block content %}
+    <h1 class="first-heading">{% trans "Password reset" %}</h1>
+    <p>{% trans "Enter your e-mail address below, and we'll e-mail instructions for setting a new one." %}</p>
+    <form action=""
+          method="post">
+          {% include "lfs/shop/lfs_form.html" %}
 
-    <h1>{% trans "Password reset" %}</h1>
-
-    <p>{% trans "Enter your e-mail address below, and we'll e-mail instructions for setting a new one." %}</p>
-
-    <form action="" 
-          method="post">
-        {{ form.email.errors }}
-        <p>
-            <label for="id_email">
-                {% trans 'E-mail address:' %}
-            </label> {{ form.email }} 
-            <input type="submit" value="{% trans 'Reset my password' %}" />
-        </p>
+        <input type="submit" value="{% trans 'Reset my password' %}" />
     </form>
-
 {% endblock %}