{% extends "admin/base_site.html" %}
{% load i18n admin_static material_form %}

{% block extrastyle %}
{{ block.super }}
{{ media.css }}
{% endblock %}


{% block body %}
{% block main %}
<div class="registration" style="background:url({% static 'material/imgs/background.svg' %})">
    <div class="sidebar z-depth-3">
        <h4>{{ title }}</h4>
        
        <form action="{{ app_path }}" method="post" id="login-form">{% csrf_token %}
            <input type="hidden" name="next" value="{{ next }}" />
            {% if 'username' in form.fields %}
                {% form %}
                    {% part form.username prefix %}<i class="material-icons prefix">account_box</i>{% endpart %}
                    {% part form.password prefix %}<i class="material-icons prefix">lock</i>{% endpart %}
                {% endform %}
                {% else %}
                    {% form %}{% endform %}
                {% endif %}
                
                {% url 'admin_password_reset' as password_reset_url %}
                {% if password_reset_url %}
                <div class="password-reset-link">
                    <a href="{{ password_reset_url }}">{% trans 'Forgotten your password or username?' %}</a>
                </div>
                {% endif %}
                <div class="action right-align">
                    <button type="submit" class="btn btn-primary">{% trans 'Log in' %}</button>
                </div>
        </form>      
    </div>
    
    {% block icon_wrapper %}
    <div class="logo">
        <i class="logo__icon material-icons">{% block icon %}account_circle{% endblock %}</i>
    </div>
    {% endblock %}
</div>
{% endblock %}
{% endblock %}
