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