{% extends "base.html" %} {% load django_bootstrap5 %} {% load i18n %} {% block title %}{% trans "Change Password" %}{% endblock title %} {% block page_heading %}{% trans "Change Password" %}{% endblock page_heading %} {% block content %} {# a user changes their own password; one who must (a new or reset account) cannot go elsewhere first #}
{% csrf_token %} {% bootstrap_form_errors form type="non_fields" %}

{{ request.user.username }}

{% if must_change %}{% trans "Choose a new password before you go on." %}{% else %}{% trans "You stay signed in here; your other sessions end." %}{% endif %}

{% bootstrap_field form.old_password %}
{% bootstrap_field form.new_password1 %}
{% bootstrap_field form.new_password2 show_help=False %}
{% if not must_change %}{% trans "Cancel" %}{% endif %}
{% endblock content %}