remove duplicated form tag
authorJan Szejko <janek37@gmail.com>
Mon, 24 Apr 2017 17:16:31 +0000 (19:16 +0200)
committerJan Szejko <janek37@gmail.com>
Mon, 24 Apr 2017 17:16:31 +0000 (19:16 +0200)
redakcja/templates/registration/login.html

index 7ec2dc1..8eade1b 100644 (file)
@@ -5,35 +5,30 @@
 
 {% block inner_content %}
 
+    <form method="POST" action="{% url 'login' %}">
+        {% csrf_token %}
+        {{ form.non_field_errors }}
+        <label for="email">
+            E-mail</label>
+            {{ form.username.errors }}
+            <input name="username" class="form-control" type="email">
 
+        <label for="password">
+            Password</label>
+            {{ form.password.errors }}
+            <input name="password" class="form-control" type="password">
 
-<form method="POST" action="{% url 'login' %}">
-{% csrf_token %}
-
-            <form method="POST" action="{% url 'login' %}">
-                {% csrf_token %}
-                {{ form.non_field_errors }}
-                <label for="email">
-                    E-mail</label>
-                    {{ form.username.errors }}
-                    <input name="username" class="form-control" type="email">
-                
-                <label for="password">
-                    Password</label>
-                    {{ form.password.errors }}
-                    <input name="password" class="form-control" type="password">
-                
-                
-                    <input type="checkbox" name="keep">
-                    <label for="keep">{% trans "Keep me logged in" %}</label>
-                
-                <div><button class="btn btn-default">
-                    {% trans "Log in" %}
-                </button>
-                </div>
-            </form>
-            <p><a href="{% url 'password_reset' %}">{% trans "I forgot my password" %}</a></p>
-            <hr>
-            <a class="btn btn-default" href="{% url 'register' %}">{% trans "Register" %}</a>
+
+            <input type="checkbox" name="keep">
+            <label for="keep">{% trans "Keep me logged in" %}</label>
+
+        <div><button class="btn btn-default">
+            {% trans "Log in" %}
+        </button>
+        </div>
+    </form>
+    <p><a href="{% url 'password_reset' %}">{% trans "I forgot my password" %}</a></p>
+    <hr>
+    <a class="btn btn-default" href="{% url 'register' %}">{% trans "Register" %}</a>
 
 {% endblock %}