password_reset_confirm_custom.html
2.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
{% extends "base.html" %}
{% load i18n %}
{% block title %}{% trans "Setting New password" %}{% endblock %}
{% block main-content %}
{% if validlink %}
<div class="row">
{% if form.errors %}
<div class="alert alert-danger">
<b>
{% if form.errors.items|length == 1 %}
{% trans "Please correct the error below and try again." %}
{% else %}
<!-- FIXME: This message was not translated yet -->
{% trans "Please correct the errors below and try again." %}
{% endif %}
</b>
</div>
{% endif %}
</div>
<br>
<form action="" method="post" role="form" class="form-horizontal signup">
{% csrf_token %}
<div class="row">
<div class="col-md-4 col-md-offset-4 col-lg-4 col-lg-offset-4 col-sm-8 col-sm-offset-2 col-xs-12">
<div class="panel panel-default">
<div class="panel-heading"><h3 class="panel-title">{% trans 'Change Password' %}</h3></div>
<div class="panel-body">
<div class="form-group{% if form.new_password1.errors %} alert alert-danger has-error{% endif %}">
{{ form.new_password1.label_tag }}
<input class="form-control" id="id_new_password1" maxlength="254" name="new_password1" type="password">
{{ form.new_password1.errors }}
</div>
<div class="form-group{% if form.new_password2.errors %} alert alert-danger has-error{% endif %}">
{{ form.new_password2.label_tag }}
<input class="form-control" id="id_new_password2" maxlength="254" name="new_password2" type="password">
{{ form.new_password2.errors }}
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="submit">
<input type="submit" value="{% trans 'Change my password' %}" class="btn btn-primary btn-lg btn-block">
</div>
<script type="text/javascript">document.getElementById("id_new_password1").focus();</script>
</div>
</form>
{% else %}
<h1>Password reset unsuccessful</h1>
<p>The password reset link was invalid, <br />
possibly because it has already been used. <br />
Please request a new password reset.</p>
{% endif %}
{% endblock %}