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