{% extends "admin/base_site.html" %}
{% load i18n admin_static %}

{% block extrastyle %}{{ block.super }}<link rel="stylesheet" type="text/css" href="{% static "admin/css/login.css" %}" />{% endblock %}

{% block bodyclass %}{{ block.super }} login{% endblock %}

{% block usertools %}{% endblock %}

{% block nav-global %}{% endblock %}

{% block content_title %}{% endblock %}

{% block breadcrumbs %}{% endblock %}

{% block content %}
{% if form.errors and not form.non_field_errors %}
<p class="errornote">
{% if form.errors.items|length == 1 %}{% trans "Please correct the error below." %}{% else %}{% trans "Please correct the errors below." %}{% endif %}
</p>
{% endif %}

{% if form.non_field_errors %}
{% for error in form.non_field_errors %}
<p class="errornote">
    {{ error }}
</p>
{% endfor %}
{% endif %}

<div id="content-main">
<form action="{{ app_path }}" method="post" id="login-form">{% csrf_token %}
  <fieldset class="module">
    <div class="form-row {% if form.username.errors %}errors{% endif %}">
      {{ form.username.errors }}
      {{ form.username.label_tag }} {{ form.username }}
    </div>
    <div class="form-row {% if form.password.errors %}errors{% endif %}">
      {{ form.password.errors }}
      {{ form.password.label_tag }} {{ form.password }}
    </div>
    <input type="hidden" name="next" value="{{ next }}" />
  </fieldset>
  <div id="bottombar">
    <button type="submit" title="{% trans 'Log in' %}"><i class="fa fa-lg fa-sign-in"></i> <span class="text">{% trans 'Log in' %}</span></button>
  </div>
</form>
{% url 'admin_password_reset' as password_reset_url %}
{% if password_reset_url %}
<div class="module password-reset-link">
  <a href="{{ password_reset_url }}">{% trans 'Forgotten your password or username?' %}</a>
</div>
{% endif %}

<script type="text/javascript">
document.getElementById('id_username').focus()
</script>
</div>
{% endblock %}
