Bug 27476: Improve link text for logging in on OPAC
[koha.git] / koha-tmpl / opac-tmpl / bootstrap / en / modules / opac-auth.tt
1 [% USE raw %]
2 [% USE Koha %]
3 [% USE Categories %]
4 [% USE KohaNews %]
5 [% PROCESS 'html_helpers.inc' %]
6 [% SET OpacLoginInstructions = KohaNews.get( location => "OpacLoginInstructions", lang => lang, library => branchcode ) %]
7 [% INCLUDE 'doc-head-open.inc' %]
8 <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog &rsaquo;
9 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
10     Log in to your account
11 [% ELSE %]
12     Catalog login disabled
13 [% END %]</title>
14 [% INCLUDE 'doc-head-close.inc' %]
15 [% BLOCK cssinclude %][% END %]
16 </head>
17 [% INCLUDE 'bodytag.inc' bodyid='opac-login-page' bodyclass='scrollto' %]
18 [% INCLUDE 'masthead.inc' %]
19
20 <div class="main">
21     <nav aria-label="breadcrumb">
22         <ul class="breadcrumb">
23             <li class="breadcrumb-item">
24                 <a href="/cgi-bin/koha/opac-main.pl">Home</a>
25             </li>
26             <li class="breadcrumb-item active" aria-current="page">
27                 <a href="#">Log in</a>
28             </li>
29         </ul>
30     </nav>
31
32     <div class="container-fluid">
33         <div class="row justify-content-center">
34             <div class="col-md-10 col-lg-6">
35                 <div id="opac-auth" class="maincontent">
36                     <!--CONTENT-->
37                     [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
38                         [% IF ( nopermission ) %]
39                             <!-- This is what is displayed if user doesn't have permission -->
40                             <div class="alert alert-warning">
41                                 <h2>Access denied</h2>
42                                 <p>Sorry, the system doesn't think you have permission to access this page. </p>
43                                 [% IF SCO_login %]
44                                     <p><a href="/cgi-bin/koha/sco/sco-main.pl?logout.x=1">Log out and try again with a different user.</a></p>
45                                 [% ELSIF SCI_login %]
46                                     <p><a href="/cgi-bin/koha/sci/sci-main.pl?logout.x=1">Log out and try again with a different user.</a></p>
47                                 [% END %]
48                             </div>
49                         [% END %]
50
51                         [% IF ( loginprompt ) %]
52                             <!-- login prompt time-->
53                             <h2>Log in to your account</h2>
54
55                             [% IF ( timed_out ) %]
56                                 <!-- This is what is displayed if login has timed out -->
57                                 <div class="alert alert-info">
58                                     <p>Sorry, your session has timed out. Please log in again.</p>
59                                 </div>
60                             [% END %]
61
62                             [% IF ( different_ip ) %]
63                                 <!-- This is what is displayed if user doesn't have permission -->
64                                 <div class="alert alert-info">
65                                     <p>You are logging from a different IP address. Please log in again.</p>
66                                 </div>
67                             [% END %]
68
69
70                             [% IF invalid_username_or_password || too_many_login_attempts %]
71                                 <!-- This is what is displayed if user doesn't have permission or account is locked. (Do not expose more information than needed.) -->
72                                 <div class="alert alert-info">
73                                     <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>
74                                 </div>
75                             [% END %]
76
77                             [% IF ( shibbolethAuthentication ) %]
78                                 [% IF ( invalidShibLogin ) %]
79                                     <!-- This is what is displayed if shibboleth login has failed to match a koha user -->
80                                     <div class="alert alert-info">
81                                         <p>Sorry, your Shibboleth identity does not match a valid library identity.</p>
82                                         [% IF ( casAuthentication ) %]
83                                             [% IF ( invalidCasLogin ) %]
84                                                 <!-- This is what is displayed if cas login has failed -->
85                                                 <p>Sorry, the CAS login also failed. If you have a local login you may use that below.</p>
86                                             [% ELSE %]
87                                                 <p>If you have a CAS account, you may use that below.</p>
88                                             [% END %]
89                                         [% ELSE %]
90                                             <p>If you have a local account, you may use that below.</p>
91                                         [% END %]
92                                     </div>
93                                 [% ELSE %]
94                                     <h3>Shibboleth Login</h3>
95                                     <p><a href="[% shibbolethLoginUrl | $raw %]">Log in using a Shibboleth account.</a></p>
96                                 [% END # /IF invalidShibLogin %]
97                                 [% IF ( casAuthentication ) %]
98                                     <h3>CAS login</h3>
99                                     <p>If you do not have a Shibboleth account, but you do have a CAS account, you can use CAS.</p>
100                                 [% ELSE %]
101                                     <h3>Local login</h3>
102                                     <p>If you do not have a Shibboleth account, but you do have a local login, then you may login below.</p>
103                                 [% END %]
104                             [% END # /IF shibbolethAuthentication %]
105
106                         [% IF ( casAuthentication ) %]
107                             [% IF ( shibbolethAuthentication ) %]
108                                 [% IF ( casServerUrl ) %]
109                                     <p><a href="[% casServerUrl | $raw %]">Log in.</a><p>
110                                 [% END %]
111
112                                 [% IF ( casServersLoop ) %]
113                                     <p>Please choose against which one you would like to authenticate: </p>
114                                     <ul>
115                                         [% FOREACH casServer IN casServersLoop %]
116                                             <li><a href="[% casServer.value | $raw %]">[% casServer.name | html %]</a></li>
117                                         [% END %]
118                                     </ul>
119                                 [% END %]
120                             [% ELSE %]
121                                 <h3>CAS login</h3>
122
123                                 [% IF ( invalidCasLogin ) %]
124                                     <!-- This is what is displayed if cas login has failed -->
125                                     <p>Sorry, the CAS login failed.</p>
126                                 [% END %]
127
128                                 [% IF ( casServerUrl ) %]
129                                    <p><a href="[% casServerUrl | $raw %]">Log in using a CAS account.</a><p>
130                                 [% END %]
131
132                                 [% IF ( casServersLoop ) %]
133                                     <p>If you have a CAS account, please choose against which one you would like to authenticate:</p>
134                                     <ul>
135                                         [% FOREACH casServer IN casServersLoop %]
136                                         <li><a href="[% casServer.value | $raw %]">[% casServer.name | html %]</a></li>
137                                         [% END %]
138                                     </ul>
139                                 [% END %]
140                             [% END # /IF shibbolethAuthentication %]
141
142                             [% IF ( shibbolethAuthentication ) %]
143                                 <p>Nothing</p>
144                             [% ELSE %]
145                                 <h3>Local login</h3>
146                                 <p>If you do not have a CAS account, but do have a local account, you can still log in: </p>
147                             [% END %]
148
149                         [% END # / IF casAuthentication %]
150
151                         [% IF ( Koha.Preference('GoogleOpenIDConnect') == 1 ) %]
152                             [% IF ( invalidGoogleOpenIDConnectLogin ) %]
153                                 <h3>Google login</h3>
154                                 <p>Sorry, your Google login failed. <span class="error">[% invalidGoogleOpenIDConnectLogin | html %]</span></p>
155                                 <p>Please note that the Google login will only work if you are using the e-mail address registered with this library.</p>
156                                 <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>
157                             [% END %]
158                             <a href="/cgi-bin/koha/svc/auth/googleopenidconnect" class="btn btn-primary" id="openid_connect">Log in with Google</a>
159                             <p>If you do not have a Google account, but do have a local account, you can still log in: </p>
160                         [% END # /IF GoogleOpenIDConnect %]
161
162                         [% IF SCO_login %]
163                             <form action="/cgi-bin/koha/sco/sco-main.pl" name="auth" id="auth" method="post" autocomplete="off">
164                         [% ELSIF SCI_login %]
165                             <form action="/cgi-bin/koha/sci/sci-main.pl" name="auth" id="auth" method="post" autocomplete="off">
166                         [% ELSE %]
167                             <form action="[% script_name | html %]" name="auth" id="auth" method="post" autocomplete="off">
168                         [% END %]
169                             <input type="hidden" name="koha_login_context" value="opac" />
170
171                             <fieldset class="brief">
172                                 [% FOREACH INPUT IN INPUTS %]
173                                     [% NEXT IF INPUT.name == 'logout.x' %]
174                                     <input type="hidden" name="[% INPUT.name | html %]" value="[% INPUT.value | html %]" />
175                                 [% END %]
176                                 <div class="form-group">
177                                     <label for="userid">Login</label>
178                                     <input class="form-control" type="text"  size="25" id="userid"  name="userid" />
179                                 </div>
180                                 <div class="form-group">
181                                     <label for="password">Password</label>
182                                     <input class="form-control" type="password"  size="25" id="password"  name="password" />
183                                 </div>
184                                 <fieldset class="action">
185                                     <input type="submit" value="Log in" class="btn btn-primary" />
186                                 </fieldset>
187                             </fieldset>
188
189                             [% IF Koha.Preference('OpacPasswordChange') && Categories.can_any_reset_password %]
190                                 <div id="forgotpassword">
191                                     <a href="/cgi-bin/koha/opac-password-recovery.pl">Forgot your password?</a>
192                                 </div>
193                             [% END %]
194                             <div id="nologininstructions">
195                                 [% IF Koha.Preference('OpacLoginInstructions') %]
196                                     [% Koha.Preference('OpacLoginInstructions') | $raw %]
197                                 [% ELSE %]
198                                     <h3>Don't have a password yet?</h3>
199                                     <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>
200                                     <h3>Don't have a library card?</h3>
201                                     <p>If you don't have a library card, stop by your local library to sign up.</p>
202                                 [% END # / IF Koha.Preference('OpacLoginInstructions') %]
203
204                                 [% IF PatronSelfRegistration && PatronSelfRegistrationDefaultCategory %]
205                                     <span id="registrationinstructions">
206                                         <a href="/cgi-bin/koha/opac-memberentry.pl">You may register here.</a>
207                                     </span>
208                                 [% END %]
209                             </div>
210                         </form>
211                     [% END # / IF loginprompt %]
212
213                     [% ELSE %]
214                         <h2>Logging on to the catalog has not been enabled by the library.</h2>
215                         <ul>
216                             <li>To report this error, you can email the Koha Administrator.<a href="mailto:[% admin | uri %]">Email</a></li>
217                             <li>Use top menu bar to navigate to another part of Koha.</li>
218                         </ul>
219                     [% END # / IF opacuserlogin %]
220
221                 </div> <!-- /.opac-auth -->
222             </div> <!-- /.col-md-10 col-lg-6 -->
223         </div> <!-- /.row -->
224     </div> <!-- /.container-fluid -->
225 </div> <!-- /.main -->
226
227 [% INCLUDE 'opac-bottom.inc' %]
228 [% BLOCK jsinclude %]
229 <script>
230     // Hide circular 'Log in to Your Account' link in opac-auth.pl
231     $(document).ready(function() {
232         if ( $("#auth" ) ) { $("#members ul li a").hide(); }
233     });
234 </script>
235 [% END %]