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

{% block mainContent %}
<div class="container">

    <!-- Outer Row -->
    <div class="row justify-content-center">

        <div class="col-xl-10 col-lg-12 col-md-9">

            <div class="card o-hidden border-0 my-5">
                <div class="card-body">
                    <div class="content-section">
                        <form method="POST" action="">
                            {{ form.hidden_tag() }}
                            <fieldset class="form-group">
                                <legend class="border-bottom mb-4">Login</legend>
                                <div class="form-group">
                                    {{ form.username.label(class="form-control-label") }}
                                    {% if form.username.errors %}
                                    {{ form.username(class="form-control form-control-lg is-invalid") }}
                                    <div class="invalid-feedback">
                                        {% for error in form.username.errors %}
                                        <span>{{ error }}</span>
                                        {% endfor %}
                                    </div>
                                    {% else %}
                                    {{ form.username(class="form-control form-control-lg") }}
                                    {% endif %}
                                </div>
                                <div class="form-group">
                                    {{ form.password.label(class="form-control-label") }}
                                    {% if form.password.errors %}
                                    {{ form.password(class="form-control form-control-lg is-invalid") }}
                                    <div class="invalid-feedback">
                                        {% for error in form.password.errors %}
                                        <span>{{ error }}</span>
                                        {% endfor %}
                                    </div>
                                    {% else %}
                                    {{ form.password(class="form-control form-control-lg") }}
                                    {% endif %}
                                </div>
                                <div class="form-check">
                                    {{ form.remember(class="form-check-input") }}
                                    {{ form.remember.label(class="form-check-label") }}
                                </div>
                            </fieldset>
                            <div class="form-group">
                                {{ form.submit(class="btn btn-info") }}
                            </div>
                        </form>
                    </div>
                    <div class="border-top pt-3">
                        <small class="text-muted">
                            Not registered? <a class="ml-2 text-cyan" href="{{ url_for('auth.register') }}">Register</a>
                        </small>
                    </div>
                </div>
            </div>

        </div>

    </div>

</div>
{% endblock mainContent %}