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