--- /dev/null
+[% IF ctx.login_failed_event %]
+<div id='login-failed-message'>
+[%
+ IF ctx.login_failed_event.textcode == 'PATRON_CARD_INACTIVE';
+ l("The barcode used to login is marked as inactive. Please contact your local library.");
+ ELSIF ctx.login_failed_event.textcode == 'PATRON_INACTIVE';
+ l("This account has been deactivated. Please contact your local library.");
+ ELSE;
+ l("Login failed. The username or password provided was not valid. " _
+ "Passwords are case-sensitive. Check your Caps-Lock key and try again or contact your local library.");
+ END;
+%]
+</div>
+[% END %]
+
+<div id='login-form-box' class='login_boxes left_brain' style='float:left'>
+ <h1>[% l('Log in to Your Account') %]</h1>
+ [% l('Please enter the following information:') %]
+ <form method='post'>
+ <div style="float: left; padding-bottom: 10px; margin-right: 40px;">
+ <label for='username_field' class="lbl1" >[% l("Numéro d'identité du Collège Boréal") %]</label>
+ <div class="input_bg">
+ <input type='text' id="username_field" name="username" autofocus />
+ </div>
+ </div>
+ <div style="float: left;">
+ <label for="password_field" class="lbl1" >[% l('PIN Number or Password') %]</label>
+ <div class="input_bg">
+ <input id="password_field" name="password" type="password" />
+ </div>
+ [% IF reset_password %]
+ <a style="font-size: 80%" href='[% mkurl(ctx.opac_root _ '/password_reset', {}, 1) %]'>[% l('Forgot your password?') %]</a>
+ [% END %]
+ </div>
+ <div style="clear: both; padding-top: 15px;">
+ [%
+ redirect = CGI.param('redirect_to');
+ # Don't use referer unless we got here from elsewhere within the TPAC
+ IF !redirect AND ctx.referer.match('^https?://' _ ctx.hostname _ ctx.opac_root);
+ redirect = ctx.referer;
+ END;
+ # If no redirect is offered or it's leading us back to the
+ # login form, redirect the user to My Account
+ IF !redirect OR redirect.match(ctx.path_info _ '$');
+ redirect = CGI.url('-full' => 1) _ '/opac/myopac/main';
+ END;
+ redirect = redirect | replace('^http:', 'https:');
+ %]
+ <input type='hidden' name='redirect_to' value='[% redirect %]'/>
+ <input type="checkbox" name="persist" id="login_persist" /><label for="login_persist"> [% l('Stay logged in?') %]</label>
+ <input type="submit" value="[% l('Log in') %]" alt="[% l('Log in') %]" class="opac-button" />
+ </div>
+ </form>
+</div>
+[% INCLUDE "opac/parts/login/help.tt2" %]