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 [% WRAPPER breadcrumbs %]
25 [% WRAPPER breadcrumb_item bc_active= 1 %]
28 [% END #/ WRAPPER breadcrumbs %]
30 <div class="container-fluid">
31 <div class="row justify-content-center">
32 <div class="col-md-10 col-lg-6">
33 <div id="opac-auth" class="maincontent">
35 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
36 [% IF ( nopermission ) %]
37 <!-- This is what is displayed if user doesn't have permission -->
38 <div class="alert alert-warning">
39 <h1>Access denied</h1>
40 <p>Sorry, the system doesn't think you have permission to access this page. </p>
42 <p><a href="/cgi-bin/koha/sco/sco-main.pl?logout.x=1">Log out and try again with a different user.</a></p>
44 <p><a href="/cgi-bin/koha/sci/sci-main.pl?logout.x=1">Log out and try again with a different user.</a></p>
49 [% IF ( loginprompt ) %]
50 <!-- login prompt time-->
51 <h1>Log in to your account</h1>
53 [% IF ( timed_out ) %]
54 <!-- This is what is displayed if login has timed out -->
55 <div class="alert alert-info">
56 <p>Sorry, your session has timed out. Please log in again.</p>
60 [% IF ( different_ip ) %]
61 <!-- This is what is displayed if user doesn't have permission -->
62 <div class="alert alert-info">
63 <p>You are logging from a different IP address. Please log in again.</p>
68 [% IF invalid_username_or_password || too_many_login_attempts %]
69 <!-- This is what is displayed if user doesn't have permission or account is locked. (Do not expose more information than needed.) -->
70 <div class="alert alert-info">
71 <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>
76 <div class="alert alert-info">
77 <p>There was an error authenticating to external identity provider</p>
78 <p>[% auth_error | html %]</p>
82 [% IF ( shibbolethAuthentication ) %]
83 [% IF ( invalidShibLogin ) %]
84 <!-- This is what is displayed if shibboleth login has failed to match a koha user -->
85 <div class="alert alert-info">
86 <p class="shib_invalid">Sorry, your Shibboleth identity does not match a valid library identity.</p>
87 [% UNLESS ( Koha.Preference('OPACShibOnly') ) %]
88 [% IF ( casAuthentication ) %]
89 [% IF ( invalidCasLogin ) %]
90 <!-- This is what is displayed if cas login has failed -->
91 <p>Sorry, the CAS login also failed. If you have a local login you may use that below.</p>
93 <p>If you have a CAS account, you may use that below.</p>
96 <p>If you have a local account, you may use that below.</p>
101 <h2 class="shib_title">Shibboleth login</h2>
102 <p><a class="shib_url" href="[% shibbolethLoginUrl | $raw %]">Log in using a Shibboleth account.</a></p>
103 [% END # /IF invalidShibLogin %]
104 [% UNLESS ( Koha.Preference('OPACShibOnly') ) %]
105 [% IF ( casAuthentication ) %]
107 <p>If you do not have a Shibboleth account, but you do have a CAS account, you can use CAS.</p>
109 <h2 class="shib_local_title">Local login</h2>
110 <p class="shib_local_text">If you do not have a Shibboleth account, but you do have a local login, then you may login below.</p>
113 [% END # /IF shibbolethAuthentication %]
115 [% UNLESS ( Koha.Preference('OPACShibOnly') ) %]
116 [% IF ( casAuthentication ) %]
117 [% IF ( shibbolethAuthentication ) %]
118 [% IF ( casServerUrl ) %]
119 <p><a href="[% casServerUrl | $raw %]">Log in.</a><p>
122 [% IF ( casServersLoop ) %]
123 <p>Please choose against which one you would like to authenticate: </p>
125 [% FOREACH casServer IN casServersLoop %]
126 <li><a href="[% casServer.value | $raw %]">[% casServer.name | html %]</a></li>
133 [% IF ( invalidCasLogin ) %]
134 <!-- This is what is displayed if cas login has failed -->
135 <p>Sorry, the CAS login failed.</p>
138 [% IF ( casServerUrl ) %]
139 <p><a href="[% casServerUrl | $raw %]">Log in using a CAS account.</a><p>
142 [% IF ( casServersLoop ) %]
143 <p>If you have a CAS account, please choose against which one you would like to authenticate:</p>
145 [% FOREACH casServer IN casServersLoop %]
146 <li><a href="[% casServer.value | $raw %]">[% casServer.name | html %]</a></li>
150 [% END # /IF shibbolethAuthentication %]
152 [% IF ( shibbolethAuthentication ) %]
156 <p>If you do not have a CAS account, but do have a local account, you can still log in: </p>
159 [% END # / IF casAuthentication %]
161 [% SET identity_providers = AuthClient.get_providers('opac') %]
162 [% IF ( ! identity_providers.empty ) %]
163 [% FOREACH provider IN identity_providers %]
165 <a href="[% provider.url | url %]" class="btn btn-light col-md-12" id="provider_[% provider.code | html %]">
166 [% IF provider.icon_url %]
167 <img src="[% provider.icon_url | url %]" style="max-height: 20px; max-width: 20px;"/>
169 <i class="fa fa-user" aria-hidden="true"></i>
171 Log in with [% provider.description | html %]
176 <p>If you do not have an external account, but do have a local account, you can still log in: </p>
177 [% END # /IF identity_providers %]
179 [% IF ( Koha.Preference('GoogleOpenIDConnect') == 1 ) %]
180 [% IF ( invalidGoogleOpenIDConnectLogin ) %]
181 <h2>Google login</h2>
182 <p>Sorry, your Google login failed. <span class="error">[% invalidGoogleOpenIDConnectLogin | html %]</span></p>
183 <p>Please note that the Google login will only work if you are using the e-mail address registered with this library.</p>
184 <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>
186 <a href="/cgi-bin/koha/svc/auth/googleopenidconnect" class="btn btn-light" id="openid_connect"><i class="fa-brands fa-google" aria-hidden="true"></i> Log in with Google</a>
187 <p>If you do not have a Google account, but do have a local account, you can still log in: </p>
188 [% END # /IF GoogleOpenIDConnect %]
189 [% END # /UNLESS OPACShibOnly %]
191 [% IF !(invalid_username_or_password || too_many_login_attempts) and password_has_expired %]
192 <div class="alert alert-info">
193 <p><strong>Error: </strong>Your password has expired!</p>
195 [% IF Koha.Preference('EnableExpiredPasswordReset') %]
196 <a href="/cgi-bin/koha/opac-reset-password.pl">Reset your password</a>.
197 [% ELSIF Koha.Preference('OpacPasswordChange') && Categories.can_any_reset_password %]
198 <div id="resetpassword">
199 <a href="/cgi-bin/koha/opac-password-recovery.pl">Reset your password</a>
202 <p>You must contact the library to reset your password</p>
204 [% ELSIF !Koha.Preference('OPACShibOnly') or SCO_login or SCI_login %]
206 <form action="/cgi-bin/koha/sco/sco-main.pl" name="auth" id="auth" method="post" autocomplete="off">
207 [% ELSIF SCI_login %]
208 <form action="/cgi-bin/koha/sci/sci-main.pl" name="auth" id="auth" method="post" autocomplete="off">
210 <form action="[% script_name | html %]" name="auth" id="auth" method="post" autocomplete="off">
212 <input type="hidden" name="koha_login_context" value="opac" />
214 <div class="local-login">
215 <fieldset class="brief">
216 [% FOREACH INPUT IN INPUTS %]
217 [% NEXT IF INPUT.name == 'logout.x' %]
218 <input type="hidden" name="[% INPUT.name | html %]" value="[% INPUT.value | html %]" />
220 <div class="form-group">
221 <label for="userid">Login:</label>
222 <input class="form-control" type="text" size="25" id="userid" name="userid" autocomplete="off" />
224 <div class="form-group">
225 <label for="password">Password:</label>
226 <input class="form-control" type="password" size="25" id="password" name="password" autocomplete="off" />
228 <fieldset class="action">
229 <input type="submit" value="Log in" class="btn btn-primary" />
234 <div id="nologininstructions">
235 [% IF OpacLoginInstructions %]
236 [% PROCESS koha_news_block news => OpacLoginInstructions %]
238 <h2>Don't have a password yet?</h2>
239 <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>
240 <h2>Don't have a library card?</h2>
241 <p>If you don't have a library card, stop by your local library to sign up.</p>
242 [% END # / IF OpacLoginInstructions %]
244 [% IF Koha.Preference('OpacPasswordChange') && Categories.can_any_reset_password %]
245 <div id="forgotpassword">
246 <p><a href="/cgi-bin/koha/opac-password-recovery.pl">Forgot your password?</a></p>
249 [% IF Koha.Preference('PatronSelfRegistration') && Categories.all( categorycode => Koha.Preference('PatronSelfRegistrationDefaultCategory') ).count %]
250 <div id="registrationinstructions">
251 <p><a href="/cgi-bin/koha/opac-memberentry.pl">Create an account</a></p>
255 [% END # / IF password_has_expired / ELSIF !OPACShibOnly or SCO_login or SCI_login %]
256 [% END # / IF loginprompt %]
259 <h1>Logging on to the catalog has not been enabled by the library.</h1>
261 <li>To report this error, you can email the Koha Administrator. <a href="mailto:[% Koha.Preference( 'KohaAdminEmailAddress' ) | uri %]">Email</a></li>
262 <li>Use top menu bar to navigate to another part of Koha.</li>
264 [% END # / IF opacuserlogin %]
266 </div> <!-- /.opac-auth -->
267 </div> <!-- /.col-md-10 col-lg-6 -->
268 </div> <!-- /.row -->
269 </div> <!-- /.container-fluid -->
270 </div> <!-- /.main -->
272 [% INCLUDE 'opac-bottom.inc' %]
273 [% BLOCK jsinclude %]
275 // Hide circular 'Log in to Your Account' link in opac-auth.pl
276 $(document).ready(function() {
277 if ( $("#auth" ) ) { $("#members ul li a").hide(); }