4 [% USE AdditionalContents %]
6 [% PROCESS 'html_helpers.inc' %]
7 [% SET OpacLoginInstructions = AdditionalContents.get( location => "OpacLoginInstructions", lang => lang, library => branchcode || default_branch ) %]
8 [% INCLUDE 'doc-head-open.inc' %]
10 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
11 Log in to your account
13 Catalog login disabled
15 [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog
17 [% INCLUDE 'doc-head-close.inc' %]
18 [% BLOCK cssinclude %][% END %]
20 [% INCLUDE 'bodytag.inc' bodyid='opac-login-page' bodyclass='scrollto' %]
21 [% INCLUDE 'masthead.inc' %]
24 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumbs">
25 <ol class="breadcrumb">
26 <li class="breadcrumb-item">
27 <a href="/cgi-bin/koha/opac-main.pl">Home</a>
29 <li class="breadcrumb-item active">
30 <a href="#" aria-current="page">Log in</a>
33 </nav> <!-- /#breadcrumbs -->
35 <div class="container-fluid">
36 <div class="row justify-content-center">
37 <div class="col-md-10 col-lg-6">
38 <div id="opac-auth" class="maincontent">
40 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
41 [% IF ( nopermission ) %]
42 <!-- This is what is displayed if user doesn't have permission -->
43 <div class="alert alert-warning">
44 <h1>Access denied</h1>
45 <p>Sorry, the system doesn't think you have permission to access this page. </p>
47 <p><a href="/cgi-bin/koha/sco/sco-main.pl?logout.x=1">Log out and try again with a different user.</a></p>
49 <p><a href="/cgi-bin/koha/sci/sci-main.pl?logout.x=1">Log out and try again with a different user.</a></p>
54 [% IF ( loginprompt ) %]
55 <!-- login prompt time-->
56 <h1>Log in to your account</h1>
58 [% IF ( timed_out ) %]
59 <!-- This is what is displayed if login has timed out -->
60 <div class="alert alert-info">
61 <p>Sorry, your session has timed out. Please log in again.</p>
65 [% IF ( different_ip ) %]
66 <!-- This is what is displayed if user doesn't have permission -->
67 <div class="alert alert-info">
68 <p>You are logging from a different IP address. Please log in again.</p>
73 [% IF invalid_username_or_password || too_many_login_attempts %]
74 <!-- This is what is displayed if user doesn't have permission or account is locked. (Do not expose more information than needed.) -->
75 <div class="alert alert-info">
76 <p>You entered an incorrect username or password. Please try again! But note that passwords are case sensitive[% IF Koha.Preference('FailedLoginAttempts') %] and that your account will be locked out after a fixed number of failed login attempts[% END %]. Please contact a library staff member if you continue to have problems.</p>
81 <div class="alert alert-info">
82 <p>There was an error authenticating to external identity provider</p>
83 <p>[% auth_error | html %]</p>
87 [% IF ( shibbolethAuthentication ) %]
88 [% IF ( invalidShibLogin ) %]
89 <!-- This is what is displayed if shibboleth login has failed to match a koha user -->
90 <div class="alert alert-info">
91 <p>Sorry, your Shibboleth identity does not match a valid library identity.</p>
92 [% UNLESS ( Koha.Preference('OPACShibOnly') ) %]
93 [% IF ( casAuthentication ) %]
94 [% IF ( invalidCasLogin ) %]
95 <!-- This is what is displayed if cas login has failed -->
96 <p>Sorry, the CAS login also failed. If you have a local login you may use that below.</p>
98 <p>If you have a CAS account, you may use that below.</p>
101 <p>If you have a local account, you may use that below.</p>
106 <h2>Shibboleth Login</h2>
107 <p><a href="[% shibbolethLoginUrl | $raw %]">Log in using a Shibboleth account.</a></p>
108 [% END # /IF invalidShibLogin %]
109 [% UNLESS ( Koha.Preference('OPACShibOnly') ) %]
110 [% IF ( casAuthentication ) %]
112 <p>If you do not have a Shibboleth account, but you do have a CAS account, you can use CAS.</p>
115 <p>If you do not have a Shibboleth account, but you do have a local login, then you may login below.</p>
118 [% END # /IF shibbolethAuthentication %]
120 [% UNLESS ( Koha.Preference('OPACShibOnly') ) %]
121 [% IF ( casAuthentication ) %]
122 [% IF ( shibbolethAuthentication ) %]
123 [% IF ( casServerUrl ) %]
124 <p><a href="[% casServerUrl | $raw %]">Log in.</a><p>
127 [% IF ( casServersLoop ) %]
128 <p>Please choose against which one you would like to authenticate: </p>
130 [% FOREACH casServer IN casServersLoop %]
131 <li><a href="[% casServer.value | $raw %]">[% casServer.name | html %]</a></li>
138 [% IF ( invalidCasLogin ) %]
139 <!-- This is what is displayed if cas login has failed -->
140 <p>Sorry, the CAS login failed.</p>
143 [% IF ( casServerUrl ) %]
144 <p><a href="[% casServerUrl | $raw %]">Log in using a CAS account.</a><p>
147 [% IF ( casServersLoop ) %]
148 <p>If you have a CAS account, please choose against which one you would like to authenticate:</p>
150 [% FOREACH casServer IN casServersLoop %]
151 <li><a href="[% casServer.value | $raw %]">[% casServer.name | html %]</a></li>
155 [% END # /IF shibbolethAuthentication %]
157 [% IF ( shibbolethAuthentication ) %]
161 <p>If you do not have a CAS account, but do have a local account, you can still log in: </p>
164 [% END # / IF casAuthentication %]
166 [% SET identity_providers = AuthClient.get_providers('opac') %]
167 [% IF ( ! identity_providers.empty ) %]
168 [% FOREACH provider IN identity_providers %]
170 <a href="[% provider.url | url %]" class="btn btn-light col-md-12" id="provider_[% provider.code | html %]">
171 [% IF provider.icon_url %]
172 <img src="[% provider.icon_url | url %]" style="max-height: 20px; max-width: 20px;"/>
174 <i class="fa fa-user" aria-hidden="true"></i>
176 Log in with [% provider.description | html %]
181 <p>If you do not have an external account, but do have a local account, you can still log in: </p>
182 [% END # /IF identity_providers %]
184 [% IF ( Koha.Preference('GoogleOpenIDConnect') == 1 ) %]
185 [% IF ( invalidGoogleOpenIDConnectLogin ) %]
186 <h2>Google login</h2>
187 <p>Sorry, your Google login failed. <span class="error">[% invalidGoogleOpenIDConnectLogin | html %]</span></p>
188 <p>Please note that the Google login will only work if you are using the e-mail address registered with this library.</p>
189 <p>If you want to, you can try to <a href="/cgi-bin/koha/svc/auth/googleopenidconnect?reauthenticate=select_account">log in using a different account</a>
191 <a href="/cgi-bin/koha/svc/auth/googleopenidconnect" class="btn btn-light" id="openid_connect"><i class="fa fa-google" aria-hidden="true"></i> Log in with Google</a>
192 <p>If you do not have a Google account, but do have a local account, you can still log in: </p>
193 [% END # /IF GoogleOpenIDConnect %]
194 [% END # /UNLESS OPACShibOnly %]
196 [% IF !(invalid_username_or_password || too_many_login_attempts) and password_has_expired %]
197 <div class="alert alert-info">
198 <p><strong>Error: </strong>Your password has expired!</p>
200 [% IF Koha.Preference('EnableExpiredPasswordReset') %]
201 <a href="/cgi-bin/koha/opac-reset-password.pl">Reset your password</a>.
202 [% ELSIF Koha.Preference('OpacPasswordChange') && Categories.can_any_reset_password %]
203 <div id="resetpassword">
204 <a href="/cgi-bin/koha/opac-password-recovery.pl">Reset your password</a>
207 <p>You must contact the library to reset your password</p>
209 [% ELSIF !Koha.Preference('OPACShibOnly') or SCO_login or SCI_login %]
211 <form action="/cgi-bin/koha/sco/sco-main.pl" name="auth" id="auth" method="post" autocomplete="off">
212 [% ELSIF SCI_login %]
213 <form action="/cgi-bin/koha/sci/sci-main.pl" name="auth" id="auth" method="post" autocomplete="off">
215 <form action="[% script_name | html %]" name="auth" id="auth" method="post" autocomplete="off">
217 <input type="hidden" name="koha_login_context" value="opac" />
219 <div class="local-login">
220 <fieldset class="brief">
221 [% FOREACH INPUT IN INPUTS %]
222 [% NEXT IF INPUT.name == 'logout.x' %]
223 <input type="hidden" name="[% INPUT.name | html %]" value="[% INPUT.value | html %]" />
225 <div class="form-group">
226 <label for="userid">Login:</label>
227 <input class="form-control" type="text" size="25" id="userid" name="userid" />
229 <div class="form-group">
230 <label for="password">Password:</label>
231 <input class="form-control" type="password" size="25" id="password" name="password" />
233 <fieldset class="action">
234 <input type="submit" value="Log in" class="btn btn-primary" />
239 <div id="nologininstructions">
240 [% IF OpacLoginInstructions %]
241 [% PROCESS koha_news_block news => OpacLoginInstructions %]
243 <h2>Don't have a password yet?</h2>
244 <p>If you don't have a password yet, stop by the circulation desk the next time you're in the library. We'll happily set one up for you.</p>
245 <h2>Don't have a library card?</h2>
246 <p>If you don't have a library card, stop by your local library to sign up.</p>
247 [% END # / IF OpacLoginInstructions %]
249 [% IF Koha.Preference('OpacPasswordChange') && Categories.can_any_reset_password %]
250 <div id="forgotpassword">
251 <a href="/cgi-bin/koha/opac-password-recovery.pl">Forgot your password?</a>
254 [% IF PatronSelfRegistration && PatronSelfRegistrationDefaultCategory %]
255 <div id="registrationinstructions">
257 <a href="/cgi-bin/koha/opac-memberentry.pl">You may register here.</a>
262 [% END # / IF password_has_expired / ELSIF !OPACShibOnly or SCO_login or SCI_login %]
263 [% END # / IF loginprompt %]
266 <h1>Logging on to the catalog has not been enabled by the library.</h1>
268 <li>To report this error, you can email the Koha Administrator. <a href="mailto:[% Koha.Preference( 'KohaAdminEmailAddress' ) | uri %]">Email</a></li>
269 <li>Use top menu bar to navigate to another part of Koha.</li>
271 [% END # / IF opacuserlogin %]
273 </div> <!-- /.opac-auth -->
274 </div> <!-- /.col-md-10 col-lg-6 -->
275 </div> <!-- /.row -->
276 </div> <!-- /.container-fluid -->
277 </div> <!-- /.main -->
279 [% INCLUDE 'opac-bottom.inc' %]
280 [% BLOCK jsinclude %]
282 // Hide circular 'Log in to Your Account' link in opac-auth.pl
283 $(document).ready(function() {
284 if ( $("#auth" ) ) { $("#members ul li a").hide(); }