{% extends "base.html" %}
{% load i18n %}
{% load form_as_table %}

{% block title %}{% trans 'Password change for' %} {{ user }}{% endblock %}
{% block robots %}noindex,nofollow{% endblock %}

{% block extrajs %}
<script type="text/javascript">
	$(function() {
		$("#id_new_password1").focus();
		$("input[type='password']").addClass("text");
	});
</script>
{% endblock %}

{% block content %}

<h2>{% trans 'Password reset' %}</h2>

{% if validlink %}

  <div class="generic_form">
    <form action="" method="post" accept-charset="utf-8">
    {% csrf_token %} 
    <table><tbody>
      {% form_as_table_rows form %}
    </tbody></table>
    <p class="submit"><input type="submit" class="i16 submit" value="{% trans "Change password" %}" /></p>
    </form>
  </div>

{% else %}
  <div class="error">
		<h3>{% trans 'Password reset unsuccessful' %}</h3>
		<p>{% trans "The password reset link was invalid, possibly because it has already been used.  Please request a new password reset." %}
  </div>
{% endif %}
{% endblock %}
