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