aboutsummaryrefslogtreecommitdiffstats
path: root/templates/registration/password_reset_confirm.html
blob: 3fb2bcb2ad33e6e640023a8336bf9ae32bce64d8 (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
56
57
{% extends "base.html" %}
{% load i18n %}

{% block content %}

{% if validlink %}

<form id="password_form" method="post" action="." autocomplete="off">
    {% for hidden in form.hidden_fields %}
        {{ hidden }}
    {% endfor %}

      {% if form.non_field_errors %}
        <div class="form-group alert alert-danger">
            {{ form.non_field_errors }}
        </div>
      {% endif %}

    {% for field in form.visible_fields %}
        {% if field.name in form.errors %}
        <div class="form-group alert alert-danger">
        {{ field.errors }}
        {% else %}
        <div class="form-group">
        {% endif %}
            <div class="control-label {% if field.required %}requiredlabel{% endif %}">
                {{ field.label_tag }}
            </div>
            <div class="controls">
                {{ field }}
            </div>
        <p>
        {{ field.help_text|safe }}
        </p>
        </div>
    {% endfor %}

  <input type="submit" class="btn btn-default" value="{% trans 'Submit' %}" />
  {% csrf_token %}
</form>

{% else %}

<p>{% trans "Password reset failed" %}</p>

{% endif %}

{% endblock %}


{% block scripts %}
<script>
    $(document).ready(function() {
        $("#password_form input:text, #password_form textarea").first().focus();
    });
</script>
{% endblock %}