corrected username/password field problem #8
authordurandn
Mon, 12 Sep 2016 16:43:56 +0200
changeset 181 c0ce1738aa88
parent 180 ad486d4dc0da
child 182 7581a9f3b2c9
corrected username/password field problem #8
src/iconolab/templates/registration/login.html
src/iconolab/templates/registration/register.html
--- a/src/iconolab/templates/registration/login.html	Mon Sep 12 16:00:21 2016 +0200
+++ b/src/iconolab/templates/registration/login.html	Mon Sep 12 16:43:56 2016 +0200
@@ -22,7 +22,7 @@
       {% for field in form %}
       <fieldset class="form-group">
         <label class="control-label" for="id_{{ field.name }}">{{ field.label }}</label>
-        <input type="{% if field.label == "Username" %}text{% else %}password{% endif %}" class="form-control"
+        <input type="{% if field.name == "username" %}text{% else %}password{% endif %}" class="form-control"
           name="{{ field.name }}"
           id="id_{{ field.name }}" > 
         {% if field.errors %}{{ field.errors }}{% endif %}
--- a/src/iconolab/templates/registration/register.html	Mon Sep 12 16:00:21 2016 +0200
+++ b/src/iconolab/templates/registration/register.html	Mon Sep 12 16:43:56 2016 +0200
@@ -9,7 +9,7 @@
       {% for field in form %}
       <fieldset class="form-group">
         <label class="control-label" for="id_{{ field.name }}">{{ field.label }}</label>
-        <input type="{% if field.label == "Username" %}text{% else %}password{% endif %}" class="form-control"
+        <input type="{% if field.name == "username" %}text{% else %}password{% endif %}" class="form-control"
           name="{{ field.name }}"
           id="id_{{ field.name }}" > 
         {% if field.errors %}{{ field.errors }}{% else %}<p class="help-text">{{ field.help_text }}</p>{% endif %}