[% IF ctx.login_failed_event %]
[% 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; %]
[% END %] [% 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:'); %] [% sso_enabled = ctx.get_org_setting(ctx.sso_org, 'opac.login.shib_sso.enable'); sso_native = ctx.get_org_setting(ctx.sso_org, 'opac.login.shib_sso.allow_native'); %]

[% l('Log in to Your Account') %]

[% IF sso_enabled %] [% final_redirect = redirect | html %]
[%- l('Please use our ') -%] [% l('Single Sign On service') %] [%- l('to log into the catalog') -%] [%- IF sso_native; l(' or use the form below'); END -%] [%- l('.') -%]


[% END %] [% IF !sso_enabled || sso_native %] [% l('Please enter the following information:') %]
[% INCLUDE "opac/parts/login/password_hint.tt2" %] [% IF reset_password == 'true' %] [% l('Forgot your password?') %] [% END %]
[% END; # native block %]
[% INCLUDE "opac/parts/login/help.tt2" %]