{# Password-reset step 3 — set a new password. Reached via a signed
token URL from the reset email. Token re-submitted with the form
so the POST handler verifies it before writing the new password.
Context: error (optional), signed_token (string). #}
{% extends "rcms_admin/_auth_layout.html" %}
{% block page_title %}{{ "Set new password" | translate(locale=LANG) }} — {{ site_name | default(value="CMS Admin") }}{% endblock %}
{% block brand_sub %}{{ "Set a new password" | translate(locale=LANG) }}{% endblock %}
{% block body %}
<form method="post" action="{{ url(name='rcms-admin:password-reset:confirm') }}">
{{ csrf_token | csrf_input | safe }}
<input type="hidden" name="token" value="{{ signed_token }}">
<h1>{{ "New password" | translate(locale=LANG) }}</h1>
<p class="rcms-lead">{{ "Choose a fresh password. Minimum 12 characters." | translate(locale=LANG) }}</p>
{% if error %}<p class="rcms-error">{{ error }}</p>{% endif %}
<label for="reset-password">{{ "New password" | translate(locale=LANG) }}</label>
<input id="reset-password" type="password" name="password" autocomplete="new-password" minlength="12" autofocus required>
<label for="reset-password-confirm">{{ "Confirm" | translate(locale=LANG) }}</label>
<input id="reset-password-confirm" type="password" name="password_confirm" autocomplete="new-password" minlength="12" required>
<div class="rcms-actions">
<a class="rcms-forgot" href="/login">{{ "← Back to sign in" | translate(locale=LANG) }}</a>
<button type="submit" class="rcms-btn">{{ "Update password" | translate(locale=LANG) }}</button>
</div>
</form>
{% endblock %}