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