{% extends ac_app_name|add:'/auth/base.html' %}
{% block content %}
<h3 class="fw-normal mb-3">{{_('login')}}</h3>
<form method="post" style="width: 23rem;">
    {% csrf_token %}

    <!-- Login Error -->
    {% if form.non_field_errors %}
    <div class="alert alert-danger" role="alert">
        {{ form.non_field_errors }}
    </div>
    {% endif %}

    <!-- Username -->
    <div data-mdb-input-init class="form-outline mb-4">
        <input type="text" id="id_username" name="username" autocomplete="username"
               value="{{form.username.value|default_if_none:''}}" class="form-control"/>
        <label class="form-label" for="id_username">{{ form.username.label }}</label>
    </div>

    <!-- Password -->
    <div data-mdb-input-init class="form-outline mb-4">
        <input type="password" id="id_password" name="password" autocomplete="current-password" class="form-control"/>
        <label class="form-label" for="id_password">{{ form.password.label }}</label>
    </div>

    <div class="pt-1 mb-4">
        <button class="btn btn-info btn-block" type="submit">{{_('login')}}</button>
    </div>

    <div class="d-flex justify-content-between mb-2">
        <a class="text-muted" href="{% url 'password_reset' %}">{{_('forgot_password')}}</a>
        <a class="text-muted" href="{% url '__activate_request' %}">{{_('request_account_activation')}}</a>
    </div>
</form>
{% endblock %}