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

{% load i18n %}
{% load account %}
{% load bootstrap3 %}

{% block header_title %}Accounts{% endblock %}

{% block content %}
<div class="content-main">
    <div class="container">
      <div class="row">
          <div class="col-md-12">
            <h2>{% trans "Sign In" %}</h2>
            <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>
            
            {% include "socialaccount/snippets/login_extra.html" %}
            
            <form role="form" class="short-form login" method="POST" action="{% url 'account_login' %}">
                  <div class="form-group">{% csrf_token %}
                  {% bootstrap_form form %}
                  {% if redirect_field_value %}
                  <input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}" />
                  {% endif %}
                <a class="button secondaryAction" href="{% url 'account_reset_password' %}">{% trans "Forgot Password?" %}</a>
                <button class="primaryAction" type="submit">{% trans "Sign In" %}</button>
                    </div>
            </form>
          </div>
        </div>
    </div>
</div>
{% endblock %}

{% block extra_js %}
    <script>
        $("#id_login").focus();
    </script>
{% endblock %}
