{% extends "account/base_manage_password.html" %}
{% load allauth i18n widget_tweaks %}
{% block head_title %}
    {% trans "Change Password" %}
{% endblock head_title %}
{% block content %}
    {% element h1 %}
        {% trans "Change Password" %}
    {% endelement %}
    {% url 'account_change_password' as action_url %}
    {% element form form=form method="post" action=action_url %}
        {% slot body %}
            {% csrf_token %}
            {#{{ redirect_field }}#}
            {# {% element fields form=form %}{% endelement %} #}

            <div class="form-floating form-floating-sm mb-3">
                {% render_field form.oldpassword placeholder="Aktuelles Passwort" class="form-control" %}
                <label for="{{ id_oldpassword }}">Aktuelles Passwort</label>
            </div>
            <div class="form-floating form-floating-sm mb-3">
                {% render_field form.password1  class="form-control" placehoder="Neues Passwort" autocomplete="new-password" required="" %}
                <label for="{{ id_password1 }}">Neues Passwort</label>
            </div>
            <div class="form-floating form-flaoting-sm mb-3">
                {% render_field form.password2  class="form-control" placehoder="Neues Passwort" autocomplete="new-password" required="" %}
                <label for="{{ id_password2 }}">Neues Passwort</label>
            </div>
        {% endslot %}
        {% slot actions %}
            <div class="text-end">
            <a class="me-2" href="{% url 'account_reset_password' %}">{% trans "Forgot Password?" %}</a>
                {% element button class="btn btn-primary" type="submit" %}
                    {% trans "Change Password" %}
                {% endelement %}
            </div>
        {% endslot %}
    {% endelement %}
{% endblock content %}