{% load i18n staticfiles %}
<script type="text/javascript">
  $(function() {
          $('#id_password').attr('placeholder', 'Mot de passe');
            });
    $(function() {
            $('#id_username').attr('placeholder', $('label[for=id_username]').text().split(":").join(""));
              });
    </script>
<div>
<form method="post" action="">
{% csrf_token %}

{{ form.non_field_errors }}
{% for field in form %}
  {% if field.is_hidden %}
    {% if field.errors %}
      <ul class="errorlist">
        {% for error in field.errors %}
        <li>
          {% blocktrans with name=field.name %}(Hidden field {{name}}) {{ error }}{% endblocktrans %}
        </li>
        {% endfor %}
      </ul>
    {% endif %}
    {{ field }}
  {% endif %}
{% endfor %}

{% for field in form %}
  {% if not field.is_hidden %}
  <p {% if field.css_classes %}class="{{ field.css_classes }}"{% endif %}>
     {{ field.label_tag }}
     {% if field.errors %}
       <ul class="errorlist">
         {% for error in field.errors %}
           <li>{{ error }}</li>
         {% endfor %}
       </ul>
     {% endif %}
     {{ field }}
     {% if field.help_text %}
       <span class="helptext">{{ field.help_text }}</span>
     {% endif %}
  </p>
  {% if field.name == "username" %}
    {% if registration_authorized %}
      <p class="text"><span>→</span><a href="{{ registration_url }}">{% trans "Not a member?" %} {% trans "Register!" %}</a></p>
    {% endif %}
  {% endif %}
  {% if field.name == "password" %}
    {% if can_reset_password %}
      <p class="text"><span>→</span><a href="{% url 'password_reset' %}{% if request.GET.next %}?next={{ request.GET.next|urlencode }}{% endif %}">{% trans "Forgot password?" %} {% trans "Reset it!" %}</a></p>
    {% endif %}
  {% endif %}
  {% endif %}
{% endfor %}


<input type="submit" name="{{ submit_name }}" value="{% trans "Log in" %}"/>
{% if cancel %}
<input type="submit" name="cancel" value="{% trans 'Cancel' %}"/>
{% endif %}
</form>
</div>

<script type="text/javascript" src="{% static "authentic2/js/js_seconds_until.js" %}"></script>
