blob: 2062df0fa21e90a6a17289ae4daeb58ccfbbe18b (
plain)
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
|
{% extends "base_m.html" %}
{% block js %} {% endblock %}
{% block title %}Change password{% endblock %}
{% block header %}<h1>Change password</h1>{% endblock %}
{% block content %}
{% if form %}
<p>When thinking of a new password you need to remember to use:</p>
<ul>
<li>no fewer than ten characters</li>
<li>at least one upper case and one lower case letter</li>
<li>three or more numbers or special characters</li>
</ul>
<p class="error">
{{ form.non_field_errors }}
</p>
<form action="{% url changepw %}" method="post" autocomplete="off">{% csrf_token %}
<table>
<tr>
<th class="formlabel">Username:</th><td>{{ username }}</td>
</tr>
{% for field in form %}
<tr>
<td class="fielderrors">{{ field.errors }}</td>
</tr>
<tr>
<th class="formlabel">{{ field.label_tag }}</th><td class="formfield">{{ field }}</td><td><span class="password_strength"></span></td>
</tr>
{% endfor %}
</table>
<input type="submit" value="Submit" />
</form>
<script type="text/javascript">
$('form').attr('autocomplete', 'off');
$('#id_new_password').password_strength();
$('#id_new_password_again').password_strength();
</script>
{% else %}
{% if return_value == 0 %}
<p>Your password was changed successfully.</p>
{% else %}
<p>Something went wrong. Please contact an administrator.</p>
<p>Return code: {{ return_value }}</p>
{% endif %}
{% endif %}
{% endblock %}
{% block footer %}
<a href="{% url index %}" data-role="button" data-icon="back">Back</a>
<a href="{% url logout %}" rel="external" data-role="button" data-icon="delete">Log out</a>
{% endblock %}
|