{% extends "ldt/user/user_base.html" %}
{# form of password change #}
{% load i18n %}

{% block css_import %}
{{ block.super }}
    <style type="text/css">
        label.error { float: none; color: red; padding-left: .5em; vertical-align: middle; }
    </style>
{% endblock %}

{% block content %}
{{ block.super }}
{% if form %}
	<form method="post" id="my_form"
		action="{% url ldt.user.views.change_password %}"
		accept-charset="utf-8">
	{% csrf_token %}
	<table>
		<tr>
			<td>
				<label for="id_old_password">{% trans "Old password" %}</label>
			</td>
			<td>
				<input type="password" name="old_password" id="id_old_password" />
			</td>
		</tr>
		<tr>
			<td>
				<label for="id_new_password1">{% trans "New password" %}</label>
			</td>
			<td>
				<input type="password" name="new_password1" id="id_new_password1" />
			</td>
		</tr>
		<tr>
			<td>
				<label for="id_new_password2">{% trans "New password confirmation" %}</label>
			</td>
			<td>
				<input type="password" name="new_password2" id="id_new_password2" />
			</td>
		</tr>
		<tr><td></td><td><input type="submit" class="button" name="submit" value="{% trans "Password change" %}" /></td></tr>
	</table>
	</form>
{% else %}
<p>{% trans "Your new password has been saved." %}</p>
{% endif %}
{% endblock%}
