password_reset_confirm.html 5.36 KB
Newer Older
1
{% extends "main_django.html" %}
2
{% load i18n %}
3

4
{% block title %}
5 6 7 8 9
<title>
  {% blocktrans with platform_name=platform_name %}
      Reset Your {{ platform_name }} Password
  {% endblocktrans %}
</title>
10
{% endblock %}
11

12
{% block bodyextra %}
13 14
  <script type="text/javascript">
    $(function() {
15

16
      // adding js class for styling with accessibility in mind
17
      $('body').addClass('js');
18

19 20 21 22 23 24
      // new window/tab opening
      $('a[rel="external"], a[class="new-vp"]')
      .click( function() {
      window.open( $(this).attr('href') );
      return false;
      });
pmitros committed
25

26 27 28 29 30 31 32 33
      // form field label styling on focus
      $("form :input").focus(function() {
        $("label[for='" + this.id + "']").parent().addClass("is-focused");
      }).blur(function() {
        $("label").parent().removeClass("is-focused");
      });
    });
  </script>
34
{% endblock %}
35

36
{% block bodyclass %}view-passwordreset{% endblock %}
37

38 39 40 41 42
{% block body %}
  <section class="introduction">
    <header>
      <h1 class="title">
        <span class="title-super">
43 44 45
          {% blocktrans with platform_name=platform_name %}
          Reset Your {{ platform_name }} Password
          {% endblocktrans %}
46 47 48 49
        </span>
      </h1>
    </header>
  </section>
50

51
  <section class="passwordreset container">
52 53 54
    <section role="main" class="content">
      {% if validlink %}
      <header>
55
      <h2 class="sr">{% trans "Password Reset Form" %}</h2>
56 57
      </header>

58
      <form role="form" id="passwordreset-form" method="post" action="">{% csrf_token %}
59 60
        <!-- status messages -->
        <div role="alert" class="status message">
61 62 63 64 65
          <h3 class="message-title">
            {% blocktrans with platform_name=platform_name %}
                We're sorry, {{ platform_name }} enrollment is not available in your region
            {% endblocktrans %}
          </h3>
66 67
        </div>

68 69 70 71 72
        {% if err_msg %}
        <div role="alert" class="status message submission-error" style="display: block;">
        {% else %}
        <div role="alert" class="status message submission-error" style="display: none;">
        {% endif %}
73
          <h3 class="message-title">{% trans "The following errors occurred while processing your registration: " %}</h3>
74
          <ul class="message-copy">
75 76 77 78 79 80
            {% if err_msg %}
              <li>{{err_msg}}</li>
            {% else %}
              <li>{% trans "You must complete all fields." %}</li>
              <li>{% trans "The two password fields didn't match." %}</li>
            {% endif %}
81 82 83 84
          </ul>
        </div>

        <div role="alert" class="status message system-error">
85
          <h3 class="message-title">{% trans "We're sorry, our systems seem to be having trouble processing your password reset" %}</h3>
86 87 88 89 90
          <p class="message-copy">
            {% blocktrans with start_link='<a href="{{MKTG_URL_CONTACT}}">' end_link='</a>' %}
                Someone has been made aware of this issue. Please try again shortly. Please {{ start_link }}contact us{{ end_link }} about any concerns you have.
            {% endblocktrans %}
          </p>
91 92 93
        </div>

        <p class="instructions">
94 95 96 97 98
        {% trans 'Please enter your new password twice so we can verify you typed it in correctly.' %}
        <br />
        {% blocktrans with bold_start='<strong class="indicator">' bold_end='</strong>' %}
        Required fields are noted by {{bold_start}}bold text and an asterisk (*){{bold_end}}.
        {% endblocktrans %}
99 100 101
        </p>

        <fieldset class="group group-form group-form-requiredinformation">
102
          <legend class="sr">{% trans "Required Information" %}</legend>
103 104

          <ol class="list-input">
105
            <li class="field required password" id="field-new_password1">
106
              <label for="new_password1">{% trans "Your New Password" %}</label>
107
              <input id="new_password1" type="password" name="new_password1" placeholder="*****" />
108
            </li>
109
            <li class="field required password" id="field-new_password2">
110
              <label for="new_password2">{% trans "Your New Password Again" %}</label>
111
              <input id="new_password2" type="password" name="new_password2" placeholder="*****" />
112 113 114 115 116
            </li>
          </ol>
        </fieldset>

        <div class="form-actions">
117
          <button name="submit" type="submit" id="submit" class="action action-primary action-update">{% trans "Change My Password" %}</button>
118 119 120 121 122 123
        </div>
      </form>

      {% else %}

      <header>
124
        <h2 class="sr">{% trans "Your Password Reset Was Unsuccessful" %}</h2>
125
      </header>
126 127 128 129 130
      <p>
        {% blocktrans with start_link='<a href="/login">' end_link='</a>' %}
            The password reset link was invalid, possibly because the link has already been used.  Please return to the {{ start_link }}login page{{ end_link }} and start the password reset process again.
        {% endblocktrans %}
      </p>
131 132 133 134 135 136

      {% endif %}
    </section>

    <aside role="complementary">
      <header>
137
      <h3 class="sr">{% trans "Password Reset Help" %}</h3>
138 139 140
      </header>

      <div class="cta cta-help">
141
        <h3>{% trans "Need Help?" %}</h3>
142 143 144 145 146
        <p>
          {% blocktrans with start_link='<a href="{{MKTG_URL_FAQ}}">' end_link='</a>' %}
              View our {{ start_link }}help section for contact information and answers to commonly asked questions{{ end_link }}
          {% endblocktrans %}
        </p>
147
      </div>
148
    </aside>
149
  </section>
150
{% endblock %}