{% extends "app.html" %}
{% from "library.j2" import showuri, standard_button, custom_form_button %}
{% block head_lead %}
{{ super() }}
{% include "copy-snippet.html" %}
{% endblock %}
{% block content %}
<h1>{% trans %}Password reset{% endtrans %}</h1>
<form method="POST">
{{- form.csrf_token -}}
<div class="form layout-expanded">
	<h2 class="form-title">{% trans user_name=localpart %}Password reset link for {{ user_name }}{% endtrans %}</h2>
	<p class="form-desc">{% trans %}The following link will allow the user to reset their password on their device, once.{% endtrans %}</p>
	<dd>
		<dt>{% trans %}Valid until{% endtrans %}</dt>
		<dd>{{ reset_link.expires | format_date }}</dd>
		<dt><label for="link-field">{% trans %}Link{% endtrans %}</label></dt>
		<dd>{% call showuri(reset_link.landing_page, id_="link-field") %}{% endcall %}</dd>
	</dd>
	<div class="f-bbox">
		{%- call custom_form_button("remove_link", form.action_revoke.name, reset_link.id_, class="secondary danger") -%}
			{% trans %}Destroy link{% endtrans %}
		{%- endcall -%}
		{%- call standard_button("back", url_for(".edit_user", localpart=localpart), class="primary") -%}
			{% trans %}Back{% endtrans %}
		{%- endcall -%}
	</div>
</div></form>
{% endblock %}
