]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/templates/opac/password_reset.tt2
LP#1832897: add miscellaneous carousels functionality to staff interface
[working/Evergreen.git] / Open-ILS / src / templates / opac / password_reset.tt2
1 [%- PROCESS "opac/parts/header.tt2";
2     WRAPPER "opac/parts/base.tt2";
3     INCLUDE "opac/parts/topnav.tt2";
4     ctx.page_title = l('Library system password reset request form');
5 -%]
6 <h2 class="sr-only">[% l('Reset Password') %]</h2>
7 <div class="mobile_hide">
8 [% INCLUDE "opac/parts/searchbar.tt2" %]
9 </div>
10
11 [%  
12     uuid = ctx.page_args.0;
13     msg_map = {
14         SUCCESS => l('Password has been reset'),
15         NO_MATCH => l('Passwords did not match. Please try again'),
16         NOT_ACTIVE => l('This was not an active password reset request. Your password has not been reset.'),
17         NOT_STRONG => l('The password you chose was not considered complex enough to protect your account. Your password has not been reset.'),
18         TWO_PASSWORDS => l('Please enter and repeat your new password.'),
19         REQUEST_SUCCESS => l('Your user name or barcode has been submitted for a password reset. ' _ 
20             'If a matching account with an email address is found, you will soon receive an email at that address with further instructions for resetting your password.')
21     }
22 %]
23 <div id="content-wrapper">
24     <div id="main-content">
25         <br/>
26         <p class='[% ctx.pwreset.style %]'>[% stat = ctx.pwreset.status; msg_map.$stat %]</p>
27         [% IF uuid %]
28             [% IF stat == 'SUCCESS' %]
29                 <p><a href='[% mkurl(ctx.opac_root _ '/myopac/main', {}, 1) %]'>[% l('Log in to My Account') %]</a>
30             [% ELSE %]
31             <form method="post">
32                 <input type='hidden' name='uuid' value='[% uuid | html %]'/>
33                 <table>
34                     <tr>
35                         <td><label for="pwd1">[% l('New password:') %]</label></td>
36                         <td><input type="password" name="pwd1"/></td>
37                     </tr>
38                     <tr>
39                         <td><label for="pwd2">[% l('Re-enter new password:') %]</label></td>
40                         <td><input type="password" name="pwd2"/></td>
41                     </tr>
42                     <tr>
43                         <td>
44                             <button name="submit" class="opac-button" id="submitButton" type="submit">[% l('Submit') %]</button>
45                         </td>
46                     </tr>
47                 </table>
48             </form>
49             [% END %]
50         [% ELSIF !ctx.pwreset.status %]
51         <h2>[% l('Please enter your user name or barcode to identify your library account and request a password reset') %]</h2>
52         [%- INCLUDE "opac/password_reset_msg.tt2" %]
53         <form method="post">
54             <table>
55                 <tr>
56                     <td><label for="barcode">[% l('Barcode:') %] </label></td>
57                     <td><input type="text" id="barcode" name="barcode"/></td>
58                 </tr>
59                 <tr>
60                     <td><label for="username">[% l('User name:') %] </label></td>
61                     <td><input type="text" id="username" name="username"/></td>
62                 </tr>
63             </table>
64             [% IF ctx.get_org_setting(ctx.physical_loc || ctx.aou_tree.id, 'circ.password_reset_request_requires_matching_email') %]
65             <label for="email">[% l('Email address associated with the account:') %] </label><input type="text" name="email"/><br/>
66             [% END %]
67             <button name="submit" id="submitButton" class="opac-button" type="submit">[% l('Submit') %]</button>
68         </form>
69         [% END %]
70     </div>
71 </div>
72 [%- END %]