3 <div id='login-form-box' class='container'>
4 <h2 class="h2 text-center">[% l('Log in to Your Account') %]</h1>
6 <div class="row text-center">[% INCLUDE "opac/parts/login/help.tt2" %]</div>
7 [% IF ctx.login_failed_event %]
8 <div id='login-failed-message'>
10 IF ctx.login_failed_event.textcode == 'PATRON_CARD_INACTIVE';
11 l("The barcode used to login is marked as inactive. <br>Please contact your local library.");
12 ELSIF ctx.login_failed_event.textcode == 'PATRON_INACTIVE';
13 l("This account has been deactivated. <br>Please contact your local library.");
15 l("Login failed. <br> The username or password provided was not valid. <br>" _
16 "Passwords are case-sensitive. <br>Check your Caps-Lock key and try again or contact your local library.");
23 <div class="mx-auto row w-75 my-5">
24 <div class='col-md-6 text-center'>
25 <label for='username_field' class="lbl1" >[% l('Library Card Number') %]</label>
26 <div class="input_bg">
27 <input type='text' id="username_field" name="username" autofocus />
29 [% INCLUDE "opac/parts/login/username_hint.tt2" %]
31 <div class='col-md-6 text-center'>
32 <label for="password_field" class="lbl1" >[% l('PIN') %]</label>
33 <div class="input_bg">
34 <input id="password_field" name="password" type="password" />
36 [% INCLUDE "opac/parts/login/password_hint.tt2" %]
37 [% IF reset_password == 'true' %]
38 <a style="font-size: 80%" href='[% mkurl(ctx.opac_root _ '/password_reset', {}, 1) %]'>[% l('Forgot your password?') %]</a>
41 <div class="col-12 pt-4 text-center">
42 <input type="checkbox" name="persist" id="login_persist" /><label for="login_persist"> [% l('Stay logged in?') %]</label><br>
43 <input type="submit" value="[% l('Log in') %]" alt="[% l('Log in') %]" class="btn btn-confirm" />
45 <div style="clear: both; padding-top: 15px;" class="col-12 text-center">
47 redirect = CGI.param('redirect_to');
48 # Don't use referer unless we got here from elsewhere within the TPAC
49 IF !redirect AND ctx.referer.match('^https?://' _ ctx.hostname _ ctx.opac_root);
50 redirect = ctx.referer;
52 # If no redirect is offered or it's leading us back to the
53 # login form, redirect the user to My Account
54 IF !redirect OR redirect.match(ctx.path_info _ '$');
55 redirect = CGI.url('-full' => 1) _ '/opac/myopac/main';
57 redirect = redirect | replace('^http:', 'https:');
59 <input type='hidden' name='redirect_to' value='[% redirect | html %]'/>
62 <input id="client_tz_id" name="client_tz" type="hidden" />