{% extends "material/frontend/base_lockscreen.html" %}
{% load i18n material_form %}

{% block title %}{% trans 'Log in' %} - {{ block.super }}{% endblock %}

{% block content %}
<form action="{{ app_path }}" method="post" id="login-form">{% csrf_token %}
    {% 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>
{% endblock %}

{% block icon %}account_circle{% endblock %}
