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

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

{% block content %}
<div class="container">
    <div class="row">
    <div class="col-lg-12">
  <h1>{% trans 'antares.apps.user.login.template.login' %}</h1>
  </div>
  
  {% if socialaccount.providers  %}
  <div class="col-lg-12">
    <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>
  
    <ul class="socialaccount_providers">
      {% include "socialaccount/snippets/provider_list.html" with process="login" %}
    </ul>
    <div class="login-or">{% trans 'or' %}</div>
    {% include "socialaccount/snippets/login_extra.html" %}
    </div>
  {% else %}
  <div class="col-lg-12">
    <p>{% trans "antares.user.web.dont_have_an_account" %}<a href="{{ signup_url }}">{% trans "antares.user.web.signup_here" %}</a>.</p>
  </div>
  {% endif %}
  <form method="POST" action="{% url 'account_login' %}">
    <div class="col-lg-12">
    {% csrf_token %}
    {% if form.non_field_errors %}
      {{ form.non_field_errors }}
    {% endif %}
    {% for field in form %}
      {% include "django_libs/partials/form_field.html" %}
    {% endfor %}
    {% if redirect_field_value %}
      <input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}" />
    {% endif %}
    <button class="btn btn-primary" type="submit">{% trans 'antares.apps.user.login.template.login' %}</button>
    <a class="btn btn-default" href="{% url 'account_reset_password' %}">{% trans 'antares.apps.user.login.template.forgot_password' %}</a>
    </div>
  </form>
  </div>
  </div>
{% endblock %}

{% block ng_app_name %}{% endblock ng_app_name %}
