{% extends "site_base.html" %}

{% load url from future %}
{% load i18n %}
{% load bootstrap_tags %}

{% block head_title %}{% trans "Log in" %}{% endblock %}

{% block body %}
  <div class="row">
    <div class="span12">
      <h2 class="page-title">{% trans "Log in to an existing account" %}</h2>
    </div>
    <form method="POST" action="{% url "account_login" %}" autocapitalize="off" class="form-horizontal"{% if form.is_multipart %} enctype="multipart/form-data"{% endif %}>
      <div class="span8">
        {% csrf_token %}
        {{ form|as_bootstrap }}
        {% if redirect_field_value %}
          <input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}" />
        {% endif %}
        <div class="form-actions">
          <a href="{% url "forgot_username" %}" class="btn">{% trans "Forgot your username?" %}</a>
          <a href="{% url "account_password_reset" %}" class="btn">{% trans "Forgot your password?" %}</a>
          <button type="submit" class="btn btn-primary">{% trans "Log in" %}</button>
        </div>
      </div>
    </form>
    <div class="span4">
      {% include "account/_login_sidebar.html" %}
    </div>
  </div>
{% endblock %}
