{% load i18n static mingo_settings %}

<div class="d-flex flex-column flex-lg-row flex-column-fluid">
    <!--begin::Logo-->
    <a href="/metronic8/demo59/index.html" class="d-block d-lg-none mx-auto py-20">
        <img alt="Logo" src="/static/media/logos/logo.png" class="theme-light-show h-25px">
        <img alt="Logo" src="/static/media/logos/logo-dark.png" class="theme-dark-show h-25px">
    </a>
    <!--end::Logo-->

    <!--begin::Aside-->
    <div class="d-flex flex-column flex-column-fluid flex-center w-lg-50 p-10">
        <div class="d-flex justify-content-between flex-column-fluid flex-column w-100 mw-450px">
            <div class="py-20">
                <form class="form w-100" action="{{ app_path }}" method="post" id="login-form">
                    {% csrf_token %}
                    <div class="text-center mb-11">
                        <h1 class="text-gray-900 fw-bolder mb-3">Sign In</h1>
                        <div class="text-gray-500 fw-semibold fs-6">Your Social Campaigns</div>
                    </div>
                    {% if form.errors and not form.non_field_errors %}
                        <p class="text-danger">{% 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="text-danger">{{ error }}</p>
                        {% endfor %}
                    {% endif %}
                    
                    <div class="fv-row mb-8">
                        {{ form.username.errors }}
                        {{ form.username }}
                    </div>
                    <div class="fv-row mb-3">
                        {{ form.password.errors }}
                        {{ form.password }}
                        <input type="hidden" name="next" value="{{ next }}">
                    </div>
                    <div class="d-flex flex-stack flex-wrap gap-3 fs-base fw-semibold mb-8">
                        <div></div>
                        {% url 'admin_password_reset' as password_reset_url %}
                        {% if password_reset_url %}
                            <a href="{{ password_reset_url }}" class="link-primary">Forgot Password ?</a>
                        {% endif %}
                    </div>
                    <div class="d-grid mb-10">
                        <button type="submit" id="kt_sign_in_submit" class="btn btn-primary">
                            <span class="indicator-label">Sign In</span>
                            <!-- <span class="indicator-progress">Please wait... 
                            <span class="spinner-border spinner-border-sm align-middle ms-2"></span></span> -->
                        </button>
                    </div>
                </form>
            </div>
        </div>
    </div>
    <!--end::Aside-->

    <div class="d-none d-lg-flex flex-lg-row-fluid w-50 bgi-size-cover bgi-position-y-center bgi-position-x-start bgi-no-repeat" style="background-image: url(/static/media/auth/bg11.png)"></div>
</div>