]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/templates/opac/parts/login/form.tt2
88a4eb883d9f10f8dbdf6614033bec4e3892dc08
[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            "Passwords are case-sensitive.  Check your Caps-Lock key 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         <div style="float: left; padding-bottom: 10px; margin-right: 40px;">
21             <label for='username_field' class="lbl1" >[% l('Library Card Number or Username') %]</label>
22             <div class="input_bg">
23                 <input type='text' id="username_field" name="username" autofocus />
24             </div>
25             <div class="lbl2">[% l('Please include leading zeros and no spaces.') %]</div>
26             <div class="lbl2">[% l('Example: 0026626051') %]</div>
27         </div>
28         <div style="float: left;">
29             <label for="password_field" class="lbl1" >[% l('PIN Number or Password') %]</label>
30             <div class="input_bg">
31                 <input id="password_field" name="password" type="password" />
32             </div>
33             <div>[% INCLUDE "opac/parts/login/password_hint.tt2" %]</div>
34             [% IF reset_password %]
35             <a style="font-size: 80%" href='[% mkurl(ctx.opac_root _ '/password_reset', {}, 1) %]'>[% l('Forgot your password?') %]</a>
36             [% END %]
37         </div>
38         <div style="clear: both; padding-top: 15px;">
39         [%
40             # If no redirect is offered or it's leading us back to the
41             # login form, redirect the user to My Account
42             redirect = CGI.param('redirect_to') || ctx.referer;
43             IF !redirect OR redirect.match(ctx.path_info _ '$');
44                 redirect = CGI.url('-full' => 1) _ '/opac/myopac/main';
45             END;
46                 redirect = redirect  | replace('^http:', 'https:');
47             %]
48             <input type='hidden' name='redirect_to' value='[% redirect %]'/>
49             <input type="checkbox" name="persist" id="login_persist" /><label for="login_persist"> [% l('Stay logged in?') %]</label>
50             <input type="submit" value="[% l('Log in') %]" alt="[% l('Log in') %]" class="opac-button" />
51         </div>
52     </form>
53 </div>
54 [% INCLUDE "opac/parts/login/help.tt2" %]