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

{% load i18n %}
{% load uni_form_tags %}
{% load account_tags %}

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


{% block body %}
    
<h1>{% trans "Sign In" %}</h1>

{% if not user.is_authenticated %}

{% if allauth.socialaccount_enabled  %}
<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" %}
</ul>

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

</div>

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

{% endif %}
{% endif %}

    <form class="login uniForm" method="POST" action="{% url account_login %}">
        {% csrf_token %}
        <fieldset class="inlineLabels">
            {{ form|as_uni_form }}
            {% if redirect_field_value %}
                <input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}" />
            {% endif %}
            <div class="buttonHolder">
                <a class="button secondaryAction" href="{% url account_reset_password %}">{% trans "Forgot Password?" %}</a>

                <button class="primaryAction" type="submit">{% trans "Sign In" %}</button>
            </div>
        </fieldset>
    </form>
    
{% if user.is_authenticated %}
{% include "account/snippets/already_logged_in.html" %}
{% endif %}
    

{% endblock %}

