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