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

{% load account %}
{% load crispy_forms_tags %}

{% block head_title %} - Sign In{% endblock %}

{% block content %}
  <div class="row">
    <div class="col-md-5">
      <h2>Log In</h2>
      {% if socialaccount.providers  %}
        <p>
          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:
        </p>

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

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

      <form class="login" method="POST" action="{% url 'account_login' %}">{% csrf_token %}
        {{ form|crispy }}
        {% if redirect_field_value %}
          <input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}" />
        {% endif %}
        <button class="btn btn-primary" type="submit">Sign In</button>
        <div class="bottom-details">
          <a href="{% url 'account_reset_password' %}">Forgot Password?</a> |
          <a href="{% url 'account_signup' %}">Sign Up</a>
        </div>
      </form>
    </div>
  </div>
{% endblock %}
