{% extends 'ui/modal.html' %}
{% load i18n %}

{% block modal_content %}
    <form id="{{ modal_id }}-form" hx-post="{% url 'user:change_password' %}">
    {% csrf_token %}
    <label class="label">
        {{ form.old_password.label }}
        {{ form.old_password }}
        <span class="has-text-danger is-size-7">{{ form.old_password.errors }}</span>
    </label>
    <label class="label has-field is-required">
        {{ form.new_password.label }}
        {{ form.new_password }}
        <span class="has-text-danger is-size-7">{{ form.new_password.errors }}</span>
    </label>
    <label class="label has-field is-required">
        {{ form.new_password_confirm.label }}
        {{ form.new_password_confirm }}
        <span class="has-text-danger is-size-7">{{ form.new_password_confirm.errors }}</span>
    </label>
</form>
{% endblock %}

{% block modal_buttons %}
	<button type="submit" form="{{ modal_id }}-form" class="button is-success">{% translate 'Save' %}</button>
    {{ block.super }}
{% endblock %}
