{% extends "account/base.html" %}

{% load url from future %}
{% load i18n %}
{% load bootstrap %}
{% load account %}

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


{% block content %}

<h1>{% trans "Log In" %}</h1>

{% if socialaccount.providers  %}
<p>{% blocktrans with site.name as site_name %}Please sign in with one of your existing third party accounts. Or, <a href="{{ signup_url }}">sign up</a> for a {{site_name}} account and sign in below:{% endblocktrans %}</p>

<div class="socialaccount_ballot">

  <ul class="socialaccount_providers">
    {% include "socialaccount/snippets/provider_list.html" with process="login" %}
  </ul>

  <div class="login-or">{% trans 'or' %}</div>

</div>

{% include "socialaccount/snippets/login_extra.html" %}

{% endif %}

<p>{% blocktrans %}If you don't have an account yet, you can <a href="{{ signup_url }}">create one in minutes</a>.{% endblocktrans %}</p>

<form class="login form-horizontal" method="POST" action="{% url 'account_login' %}">
  {% csrf_token %}
  {{ form|bootstrap_horizontal }}
  {% if redirect_field_value %}
  <input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}" />
  {% endif %}
  <div class="form-actions">
    <button class="btn btn-primary" type="submit">{% trans "Log In" %}</button>
    <a class="btn" href="{% url 'account_reset_password' %}">{% trans "Forgot Password?" %}</a>

  </div>
</form>

{% endblock %}

