password_reset_confirm.html 3.42 KB
Newer Older
1
## mako
2

3 4 5 6
<%page expression_filter="h"/>

<%!
from django.utils.translation import ugettext as _
7
from openedx.core.djangolib.markup import HTML, Text
8
%>
9

10
<%inherit file="../main.html"/>
11

12
<%block name="title">
13
    <title>${_("Reset Your {platform_name} Password").format(platform_name=platform_name)}</title>
14
</%block>
15

16 17 18 19 20 21 22
<%block name="bodyextra">
    <script type="text/javascript" src="${STATIC_URL}js/student_account/password_reset.js"></script>
</%block>

<%block name="bodyclass">view-passwordreset</%block>

<%block name="body">
23 24 25
<div id="password-reset-confirm-container" class="login-register">
    <section id="password-reset-confirm-anchor" class="form-type">
        <div id="password-reset-confirm-form" class="form-wrapper" aria-live="polite">
26
            <div class="status submission-error ${'hidden' if not err_msg else ''}">
27
                <h4 class="message-title">${_("Error Resetting Password")}</h4>
28
                <ul class="message-copy">
29 30 31 32 33 34
                % if err_msg:
                    <li>${err_msg}</li>
                % else:
                    <li>${_("You must enter and confirm your new password.")}</li>
                    <li>${_("The text in both password fields must match.")}</li>
                % endif
35 36 37
                </ul>
            </div>

38 39
            % if validlink:
            <form role="form" id="passwordreset-form" method="post" action="">
40 41 42
                <div class="section-title lines">
                    <h2>
                        <span class="text">
43
                        ${_("Reset Your Password")}
44 45 46 47 48
                        </span>
                    </h2>
                </div>

                <p class="action-label" id="new_password_help_text">
49
                    ${_("Enter and confirm your new password.")}
50 51 52
                </p>

                <div class="form-field new_password1-new_password1">
53
                    <label for="new_password1">${_("New Password")}</label>
54 55 56
                    <input id="new_password1" type="password" name="new_password1" aria-describedby="new_password_help_text" />
                </div>
                <div class="form-field new_password2-new_password2">
57
                    <label for="new_password2">${_("Confirm Password")}</label>
58 59 60
                    <input id="new_password2" type="password" name="new_password2" />
                </div>

61 62 63
                <input type="hidden" id="csrf_token" name="csrfmiddlewaretoken" value="${csrf_token}">

                <button type="submit" class="action action-primary action-update js-reset">${_("Reset My Password")}</button>
64
            </form>
65
            % else:
66
            <div class="status submission-error">
67
                <h4 class="message-title">${_("Invalid Password Reset Link")}</h4>
68
                <ul class="message-copy">
69
                    ${Text(_((
70
                        "This password reset link is invalid. It may have been used already. To reset your password, "
71 72 73 74 75 76 77 78
                        "go to the {start_link}sign-in{end_link} page and select {start_strong}Forgot password{end_strong}."
                        ))).format(
                            start_link=HTML('<a href="/login">'),
                            end_link=HTML('</a>'),
                            start_strong=HTML('<strong>'),
                            end_strong=HTML('</strong>')
                        )
                    }
79 80
                </ul>
            </div>
81
            % endif
82 83
        </div>
    </section>
84
</div>
85
</%block>