{% load i18n static %}

{% include "_head.html" %}

<body class="app app-login p-0">    	
    <div class="row g-0 app-auth-wrapper">
	    <div class="col-12 col-md-7 col-lg-6 auth-main-col text-center p-5">
		    <div class="d-flex flex-column align-content-end">
			    <div class="app-auth-body mx-auto">	
					{% include "_branding.html" %}
					<h2 class="auth-heading text-center mb-5">Entrar en Entrenadores</h2>

                        {% if form.errors and not form.non_field_errors %}
                        <p class="errornote">
                        {% blocktranslate count counter=form.errors.items|length %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktranslate %}
                        </p>
                        {% endif %}

                        {% if form.non_field_errors %}
                        {% for error in form.non_field_errors %}
                        <p class="errornote">
                            {{ error }}
                        </p>
                        {% endfor %}
                        {% endif %}
                    
                    <div class="auth-form-container text-start" id="content-main">
                        {% if user.is_authenticated %}
                        <p class="errornote">
                        {% blocktranslate trimmed %}
                            You are authenticated as {{ username }}, but are not authorized to
                            access this page. Would you like to login to a different account?
                        {% endblocktranslate %}
                        </p>
                        {% endif %}

                        <form class="auth-form login-form" action="{{ app_path }}" method="post" id="login-form">{% csrf_token %}
                            <div class="text mb-3">
                                {{ form.username.errors }}
                                {{ form.username.label_tag }}
                            </div>                            
                            <div class="text mb-3">
                                {{ form.username }}
                            </div>
                            <div class="password mb-3">
                                {{ form.password.errors }}
                                {{ form.password.label_tag }}
                            </div>
                            <div class="password mb-3">
                                {{ form.password }}
                                <input type="hidden" name="next" value="{{ next }}">
                            </div>
                            {% url 'admin_password_reset' as password_reset_url %}
                            {% if password_reset_url %}
                            <div class="password-reset-link">
                                <a href="{{ password_reset_url }}">{% translate 'Forgotten your password or username?' %}</a>
                            </div>
                            {% endif %}

                            <div class="text-center">
                                <input type="submit" class="btn app-btn-primary w-100 theme-btn mx-auto" value="{% translate 'Log in' %}">
                            </div>
                        </form>
                    </div>
                </div>
                {% include "_footer.html" %}
            </div>
        </div>
        <div class="col-12 col-md-5 col-lg-6 h-100 auth-background-col">
            <div class="auth-background-holder">
            </div>
            <div class="auth-background-mask"></div>
            <div class="auth-background-overlay p-3 p-lg-5">
                <div class="d-flex flex-column align-content-end h-100">
                    <div class="h-100"></div>
                    <!--
                    <div class="overlay-content p-3 p-lg-4 rounded">
                        <h5 class="mb-3 overlay-title">Explore Portal Admin Template</h5>
                        <div>Portal is a free Bootstrap 5 admin dashboard template. You can download and view the template license <a href="https://themes.3rdwavemedia.com/bootstrap-templates/admin-dashboard/portal-free-bootstrap-admin-dashboard-template-for-developers/">here</a>.</div>
                    </div>
		    -->
                </div>
            </div><!--//auth-background-overlay-->
        </div><!--//auth-background-col-->

    </div><!--//row-->

</body>
</html> 
