{% extends "adminlte/base.html" %}
{% load i18n static %}

{% block body_class %}login-page{% endblock %}

{% block body %}
    <div class="login-box">
        {% block logo %}
        <div class="login-logo">
            {# Mirrors block names used in _main_header.html #}
            <a href="{% block logo_href %}/{% endblock %}"><b>ZOOM</b>ADMIN</a>
        </div>
        {% endblock %}
        <!-- /.login-logo -->
        <div class="login-box-body">
            {% block login_errors %}
                {% if form.errors and not form.non_field_errors %}
                    <p class="alert alert-danger">
                        {% if form.errors.items|length == 1 %}{% trans "Please correct the error below." %}{% else %}
                            {% trans "Please correct the errors below." %}{% endif %}
                    </p>
                {% endif %}

                {% if form.non_field_errors %}
                    {% for error in form.non_field_errors %}
                        <p class="alert alert-danger">
                            {{ error }}
                        </p>
                    {% endfor %}
                {% endif %}
            {% endblock login_errors %}

            {% block login_form %}
                <form action="" method="post">
                    {% csrf_token %}
                    {% if message %}
                        <p class="login-box-msg" style="color: red;">{{ message }}</p>
                    {% endif %}
                    <div class="form-group has-feedback">
                        <input name="username" class="form-control" placeholder="{% trans 'Username' %}">
                        <span class="glyphicon glyphicon-user form-control-feedback"></span>
                    </div>
                    <div class="form-group has-feedback">
                        <input type="password" name="password" class="form-control" placeholder="{% trans 'Password' %}">
                        <span class="glyphicon glyphicon-lock form-control-feedback"></span>
                    </div>
                    <div class="row">
                        <div class="col-xs-8">
                            {% block login_form_links %}
                            {% endblock %}
                        </div>
                        <div class="col-xs-4">
                            <button type="submit" class="btn btn-primary btn-block btn-flat">{% trans 'Login' %}</button>
                        </div>
                    </div>
                </form>
            {% endblock login_form %}

        </div>
    </div>
{% endblock %}
