{% extends 'base_narrow.html' %}

{% block body %}
<form action="{{ url_for("selfservice.token_password", token_id=token.id, token=token.token) }}" method="POST" onInput="password2.setCustomValidity(password1.value != password2.value ? 'Passwords do not match.' : '') ">
	<div class="col-12">
		<h2 class="text-center">{{_("Reset password")}}</h2>
	</div>
	<div class="form-group col-12">
		<label for="user-password1">{{_("New Password")}}</label>
		<input type="password" class="form-control" id="user-password1" name="password1" tabindex="2" minlength={{ User.PASSWORD_MINLEN }} maxlength={{ User.PASSWORD_MAXLEN }} pattern="{{ User.PASSWORD_REGEX }}" required>
		<small class="form-text text-muted">
			{{ User.PASSWORD_DESCRIPTION|safe }}
		</small>
	</div>
	<div class="form-group col-12">
		<label for="user-password2">{{_("Repeat Password")}}</label>
		<input type="password" class="form-control" id="user-password2" name="password2" tabindex="3" required>
	</div>
	<div class="form-group col-12">
		<button type="submit" class="btn btn-primary btn-block" tabindex = "3">{{_("Set password")}}</button>
	</div>
</form>
{% endblock %}
