Commits

Joseph Turian committed b158d2e

Added login_form.haml

Comments (0)

Files changed (1)

email_login/templates/email_login/login_form.haml

+{% load i18n %}
+
+- if form.errors and not form.non_field_errors and not form.this_is_the_login_form.errors
+  %p.errornote
+    {% blocktrans count form.errors.items|length as counter %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktrans %}
+
+- 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.errornote
+      {{ error }}
+#content-main
+  %form#login-form{:action => "{{ app_path }}", :method => "post"}
+    - csrf_token
+    .form-row
+      - if not form.this_is_the_login_form.errors
+        {{ form.email.errors }}
+      %label.required{:for => "id_email"}
+      {% trans 'Email address' %}:
+      {{ form.email }}
+    .form-row
+      - if not form.this_is_the_login_form.errors
+        {{ form.password.errors }}
+      %label.required{:for => "id_password"}
+      {% trans 'Password' %}:
+      {{ form.password }}
+      %input{:name => "this_is_the_login_form", :type => "hidden", :value => "1"}/
+      %input{:name => "next", :type => "hidden", :value => "{{ next }}"}/
+      %input{:name => "post_data", :type => "hidden", :value => "{{ post_data }}"}/
+      %span.help
+        %a{:href => "{% url django.contrib.auth.views.password_reset %}"}
+          {% trans 'I forgot my password' %}
+    .submit-row
+      %label  
+      %input{:type => "submit", :value => "{% trans \"Log in\" %}"}/
+  :javascript
+    document.getElementById('id_email').focus()