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

{% load static %}
{% load account_tags %}
{% load i18n %}
{% load bootstrap4 %}


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

{% block content %}
    <div class="row">
        <div class="col  m-0">
            <div class="login-box login m-0">
                <div class="login-card">
                    <div class="image"> 
                        <img src="{{details.logo.logo.url}}" href="{{details.info.website.url}}" height="100px" style="align-self: center; margin-bottom: 20px;" class="" alt="">
                    </div> 
                    <form method="POST" action="{% url "accounts_login" %}" autocapitalize="off" {% if form.is_multipart %} enctype="multipart/form-data"{% endif %}>
                        <legend class="">{% trans "Log in to an existing account" %}</legend>

                        {% csrf_token %}
                        {% bootstrap_form form %}
                        {% if redirect_field_value %}
                            <input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}" />
                        {% endif %}
                        <button type="submit" class="btn btn-info btn-lg ">{% trans "Log in" %}</button>
                        <a href="{% url "account_password_reset" %}" class="btn btn-light">{% trans "Forgot your password?" %}</a>
                    </form>
                    {% if ACCOUNT_OPEN_SIGNUP %}
                        <p class="login-signup">
                            <small>
                                {% trans "Don't have an account?" %}  <strong><a href="{% urlnext 'account_signup' %}" class="text-white">{% trans "Sign up" %}</a></strong>
                            </small>
                        </p>
                    {% endif %}
                </div>
            </div>
        </div>
        <!-- <div class="col-md-6 bg-dark">
            {#% include "account/_login_sidebar.html" %#}
        </div> -->
    </div>
{% endblock %}

{% block scripts %}
    {{ block.super }}
    <script type="text/javascript">
        $(document).ready(function() {
            $('#id_username').focus();
        });
    </script>
{% endblock %}
