]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/templates/opac/parts/login/form.tt2
TPAC - new CSS for login help elements
[working/Evergreen.git] / Open-ILS / src / templates / opac / parts / login / form.tt2
1 [% IF ctx.login_failed_event %]
2 <div id='login-failed-message'>
3 [%
4     IF ctx.login_failed_event.textcode == 'PATRON_CARD_INACTIVE';
5         l("The barcode used to login is marked as inactive.  Please contact your local library.");
6     ELSIF ctx.login_failed_event.textcode == 'PATRON_INACTIVE';
7         l("This account has been deactivated.  Please contact your local library.");
8     ELSE;
9         l("Login failed. The username or password provided was not valid.  
10             Ensure Caps-Lock is off and try again or contact your local library.");
11     END;
12 %]
13 </div>
14 [% END %]
15
16 <div id='login-form-box' class='login_boxes left_brain' style='float:left'>
17     <h1>[% l('Log in to Your Account') %]</h1>
18     [% l('Please enter the following information:') %]
19     <form method='POST'>
20         <table>
21             <tr>
22                 <td style="width: 20em; vertical-align: top; padding-top: 1.5em;" class='lbl1'><label for='username_field'>[% l('Library Card Number or Username') %]</label>
23                     <div class="lbl2">[% l('Please include leading zeros and no spaces.') %]</div>
24                     <div class="lbl2">[% l('Example: 0026626051') %]</div>
25                 </td>
26                 <td style="vertical-align: top; padding-top: 1.5em;">
27                     <div class="input_bg">
28                         <input type="text" id="username_field" name="username" autofocus />
29                     </div>
30                 </td>
31             </tr>
32             <tr>
33                 <td class="lbl1" style="width: 20em; vertical-align: top; padding-top: 1.5em">
34                     <label for="password_field">[% l('PIN Number or Password') %]</label>
35                     <div>[% INCLUDE "opac/parts/login/password_hint.tt2" %]</div>
36                 </td>
37                 <td  style="vertical-align: top; padding-top: 1.5em;">
38                     <div class="input_bg">
39                         <input id="password_field" name="password" type="password" />
40                     </div>
41                     <div>
42                         [%
43                             # If no redirect is offered or it's leading us back to the 
44                             # login form, redirect the user to My Account
45                             redirect = CGI.param('redirect_to') || ctx.referer;
46                             IF !redirect OR redirect.match(ctx.path_info _ '$');
47                                 redirect = CGI.url('-full' => 1) _ '/opac/myopac/main';
48                             END;
49                             redirect = redirect  | replace('^http:', 'https:');
50                         %]
51                         <input type='hidden' name='redirect_to' value='[% redirect %]'/>
52                         <input type="checkbox" name="persist" id="login_persist" /><label for="login_persist"> [% l('Stay logged in?') %]</label>
53                     </div>
54                     <div style="padding-top: 1em; margin-right: 1em;">
55                         <input type="submit" value="[% l('Log in') %]" alt="[% l('Log in') %]" class="opac-button" />
56                         [% IF reset_password %]
57                         <a href='[% mkurl(ctx.opac_root _ '/password_reset', {}, 1) %]'>[% l('Forgot your password?') %]</a>
58                         [% END %]
59                     </div>
60                 </td>
61             </tr>
62         </table>
63     </form>
64 </div>
65 [% INCLUDE "opac/parts/login/help.tt2" %]