{% extends "userprofile/base_2col.html" %}
{% load i18n %}
{% load txcommontags %}

{% 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 userprofile_navigation %}
{% include "userprofile/menu.html" %}
{% endblock %}

{% block userprofile_content %}

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

{% if validlink %}

  <div class="generic_form">
    <form action="{% url password_reset_confirm %}" method="post" accept-charset="utf-8">
    <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 %}
