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