1
2
3
4
5
6
7
8
9
10
11
12
13
{% extends "base.html" %}
{% block content %}<div class="pagehead"><h1 class="title">Account</h1><p class="count">Signed in as {{ user }}</p></div>{% if !message.is_empty() %}{% if ok %}<p class="alert ok" role="status">{{ message }}</p>{% else %}<p class="alert" role="alert">{{ message }}</p>{% endif %}{% endif %}
<section class="panel form-panel"><h2>Change password</h2>
<form class="form" method="post" action="/account">
<input type="hidden" name="csrf" value="{{ csrf }}">
<label>Current password<input name="current" type="password" autocomplete="current-password" required></label>
<label>New password<span class="hint">At least {{ min_password }} characters.</span><input name="new" type="password" autocomplete="new-password" minlength="{{ min_password }}" required></label>
<label>Repeat new password<input name="repeat" type="password" autocomplete="new-password" minlength="{{ min_password }}" required></label>
<label>Authenticator code<input name="code" inputmode="numeric" autocomplete="one-time-code" pattern="[0-9]{6}" maxlength="6" required></label>
<button class="button primary" type="submit">Change password</button></form>
<p class="hint">Changing the password signs out every other session.</p></section>
<section class="panel form-panel"><h2>Sign out</h2>
<form method="post" action="/logout"><input type="hidden" name="csrf" value="{{ csrf }}"><button class="button" type="submit">Sign out</button></form></section>{% endblock %}