{% extends base_site_template %}

{% block title %}Password change{% endblock %}

{% block content %}
<form class="form" role="form" action="" method="post">{% csrf_token %}
<div>
{% if form.errors %}
	<div class="alert alert-danger">Please correct the error(s) below.</div>
{% endif %}

<h1>Password change</h1>

<p>Please enter your old password, for security's sake, and then enter your new password twice so we can verify you typed it in correctly.</p>

<fieldset>

<div class="form-group">
    {{ form.old_password.errors }}
    <label for="id_old_password" class="form-label required">Old password:</label>{{ form.old_password }}
</div>

<div class="form-group">
    {{ form.new_password1.errors }}
    <label for="id_new_password1" class="form-label required">New password:</label>{{ form.new_password1 }}
</div>

<div class="form-group">
{{ form.new_password2.errors }}
    <label for="id_new_password2" class="form-label required">Repeat New password:</label>{{ form.new_password2 }}
</div>

</fieldset>

<div class="submit-row">
    <input type="submit" value="Change my password" class="btn btn-info" />
</div>

<script type="text/javascript">document.getElementById("id_old_password").focus();</script>
</div>
</form>

{% endblock %}
