View | Details | Raw Unified | Return to bug 18506
Collapse All | Expand All

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth.tt (-89 / +108 lines)
Lines 44-68 Link Here
44
                            <h3>Log in to your account</h3>
44
                            <h3>Log in to your account</h3>
45
45
46
                            [% IF ( timed_out ) %]
46
                            [% IF ( timed_out ) %]
47
                                <!-- This is what is displayed if login has timed out -->
47
                            <!-- This is what is displayed if login has timed out -->
48
                                <div class="alert alert-info">
48
                            <div class="alert alert-info">
49
                                    <p>Sorry, your session has timed out. Please log in again.</p>
49
                                <p>Sorry, your session has timed out. Please log in again.</p>
50
                                </div>
50
                            </div>
51
                            [% END %]
51
                            [% END %]
52
52
53
                            [% IF ( different_ip ) %]
53
                            [% IF ( different_ip ) %]
54
                                <!-- This is what is displayed if user doesn't have permission -->
54
                            <!-- This is what is displayed if user doesn't have permission -->
55
                                <div class="alert alert-info">
55
                            <div class="alert alert-info">
56
                                    <p>You are logging from a different IP address. Please log in again.</p>
56
                                <p>You are logging from a different IP address. Please log in again.</p>
57
                                </div>
57
                            </div>
58
                            [% END %]
58
                            [% END %]
59
59
60
61
                            [% IF invalid_username_or_password || too_many_login_attempts %]
60
                            [% IF invalid_username_or_password || too_many_login_attempts %]
62
                                <!-- This is what is displayed if user doesn't have permission or account is locked. (Do not expose more information than needed.) -->
61
                            <!-- This is what is displayed if user doesn't have permission or account is locked. (Do not expose more information than needed.) -->
63
                                <div class="alert alert-info">
62
                            <div class="alert alert-info">
64
                                    <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>
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>
65
                                </div>
64
                            </div>
66
                            [% END %]
65
                            [% END %]
67
66
68
                            [% IF ( shibbolethAuthentication ) %]
67
                            [% IF ( shibbolethAuthentication ) %]
Lines 70-163 Link Here
70
                                    <!-- This is what is displayed if shibboleth login has failed to match a koha user -->
69
                                    <!-- This is what is displayed if shibboleth login has failed to match a koha user -->
71
                                    <div class="alert alert-info">
70
                                    <div class="alert alert-info">
72
                                    <p>Sorry, your Shibboleth identity does not match a valid library identity.</p>
71
                                    <p>Sorry, your Shibboleth identity does not match a valid library identity.</p>
73
                                    [% IF ( casAuthentication ) %]
72
                                    [% UNLESS ( Koha.Preference('opacShibOnly') ) %]
74
                                        [% IF ( invalidCasLogin ) %]
73
                                        [% IF ( casAuthentication ) %]
75
                                            <!-- This is what is displayed if cas login has failed -->
74
                                            [% IF ( invalidCasLogin ) %]
76
                                            <p>Sorry, the CAS login also failed. If you have a local login you may use that below.</p>
75
                                                <!-- This is what is displayed if cas login has failed -->
76
                                                <p>Sorry, the CAS login also failed. If you have a local login you may use that below.</p>
77
                                            [% ELSE %]
78
                                                <p>If you have a CAS account, you may use that below.</p>
79
                                            [% END %]
77
                                        [% ELSE %]
80
                                        [% ELSE %]
78
                                            <p>If you have a CAS account, you may use that below.</p>
81
                                            <p>If you have a local account, you may use that below.</p>
79
                                        [% END %]
82
                                        [% END %]
80
                                    [% ELSE %]
81
                                        <p>If you have a local account, you may use that below.</p>
82
                                    [% END %]
83
                                    [% END %]
83
                                    </div>
84
                                    </div>
84
                            [% ELSE %]
85
                                [% ELSE %]
85
                                <h4>Shibboleth Login</h4>
86
                                    <h4>Shibboleth Login</h4>
86
                                <p><a href="[% shibbolethLoginUrl | url %]">If you have a Shibboleth account, please click here to log in.</a></p>
87
                                    <p><a href="[% shibbolethLoginUrl | url %]">If you have a Shibboleth account, please click here to log in.</a></p>
87
                            [% END %]
88
                                [% END %]
88
                            [% IF ( casAuthentication ) %]
89
                                [% UNLESS ( Koha.Preference('opacShibOnly') ) %]
89
                                <h4>CAS login</h4>
90
                                    [% IF ( casAuthentication ) %]
90
                                <p>If you do not have a Shibboleth account, but you do have a CAS account, you can use CAS.</p>
91
                                    <h4>CAS login</h4>
91
                            [% ELSE %]
92
                                    <p>If you do not have a Shibboleth account, but you do have a CAS account, you can use CAS.</p>
92
                                <h4>Local login</h4>
93
                                    [% ELSE %]
93
                                <p>If you do not have a Shibboleth account, but you do have a local login, then you may login below.</p>
94
                                    <h4>Local login</h4>
94
                            [% END %]
95
                                    <p>If you do not have a Shibboleth account, but you do have a local login, then you may login below.</p>
95
96
                                    [% END %]
96
                        [% END %]
97
98
                        [% IF ( casAuthentication ) %]
99
                            [% IF ( shibbolethAuthentication ) %]
100
                                [% IF ( casServerUrl ) %]
101
                                    <p><a href="[% casServerUrl | $raw %]">Please click here to log in.</a><p>
102
                                [% END %]
97
                                [% END %]
98
                            [% END # / IF shibbolethAuthentication %]
103
99
104
                                [% IF ( casServersLoop ) %]
100
                            [% UNLESS ( Koha.Preference('opacShibOnly') ) %]
105
                                    <p>Please choose against which one you would like to authenticate: </p>
101
                                [% IF ( casAuthentication ) %]
106
                                    <ul>
102
                                    [% IF ( shibbolethAuthentication ) %]
107
                                        [% FOREACH casServer IN casServersLoop %]
103
                                        [% IF ( casServerUrl ) %]
108
                                            <li><a href="[% casServer.value | $raw %]">[% casServer.name | html %]</a></li>
104
                                            <p><a href="[% casServerUrl | $raw %]">Please click here to log in.</a><p>
109
                                        [% END %]
105
                                        [% END %]
110
                                    </ul>
111
                                [% END %]
112
                            [% ELSE %]
113
                                <h4>CAS login</h4>
114
106
115
                                [% IF ( invalidCasLogin ) %]
107
                                        [% IF ( casServersLoop ) %]
116
                                    <!-- This is what is displayed if cas login has failed -->
108
                                            <p>Please choose against which one you would like to authenticate: </p>
117
                                    <p>Sorry, the CAS login failed.</p>
109
                                            <ul>
118
                                [% END %]
110
                                                [% FOREACH casServer IN casServersLoop %]
111
                                                    <li><a href="[% casServer.value | $raw %]">[% casServer.name | html %]</a></li>
112
                                                [% END %]
113
                                            </ul>
114
                                        [% END %]
115
                                    [% ELSE %]
116
                                        <h4>CAS login</h4>
119
117
120
                                [% IF ( casServerUrl ) %]
118
                                        [% IF ( invalidCasLogin ) %]
121
                                   <p><a href="[% casServerUrl | $raw %]">If you have a CAS account, please click here to log in.</a><p>
119
                                            <!-- This is what is displayed if cas login has failed -->
122
                                [% END %]
120
                                            <p>Sorry, the CAS login failed.</p>
121
                                        [% END %]
123
122
124
                                [% IF ( casServersLoop ) %]
123
                                        [% IF ( casServerUrl ) %]
125
                                    <p>If you have a CAS account, please choose against which one you would like to authenticate:</p>
124
                                           <p><a href="[% casServerUrl | $raw %]">If you have a CAS account, please click here to log in.</a><p>
126
                                    <ul>
127
                                        [% FOREACH casServer IN casServersLoop %]
128
                                        <li><a href="[% casServer.value | $raw %]">[% casServer.name | html %]</a></li>
129
                                        [% END %]
125
                                        [% END %]
130
                                    </ul>
131
                                [% END %]
132
                            [% END %]
133
126
134
                            [% IF ( shibbolethAuthentication ) %]
127
                                        [% IF ( casServersLoop ) %]
135
                                <p>Nothing</p>
128
                                            <p>If you have a CAS account, please choose against which one you would like to authenticate:</p>
136
                            [% ELSE %]
129
                                            <ul>
137
                                <h4>Local login</h4>
130
                                                [% FOREACH casServer IN casServersLoop %]
138
                                <p>If you do not have a CAS account, but do have a local account, you can still log in: </p>
131
                                                <li><a href="[% casServer.value | $raw %]">[% casServer.name | html %]</a></li>
139
                            [% END %]
132
                                                [% END %]
133
                                            </ul>
134
                                        [% END %]
135
                                    [% END %]
140
136
141
                        [% END # / IF casAuthentication %]
137
                                    [% IF ( shibbolethAuthentication ) %]
138
                                        <p>Nothing</p>
139
                                    [% ELSE %]
140
                                        <h4>Local login</h4>
141
                                        <p>If you do not have a CAS account, but do have a local account, you can still log in: </p>
142
                                    [% END %]
143
                                [% END # / IF casAuthentication %]
144
145
                                [% IF ( Koha.Preference('GoogleOpenIDConnect') == 1 ) %]
146
                                    [% IF ( invalidGoogleOpenIDConnectLogin ) %]
147
                                        <h4>Google login</h4>
148
                                        <p>Sorry, your Google login failed. <span class="error">[% invalidGoogleOpenIDConnectLogin | html %]</span></p>
149
                                        <p>Please note that the Google login will only work if you are using the e-mail address registered with this library.</p>
150
                                        <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>
151
                                    [% END %]
152
                                        <a href="/cgi-bin/koha/svc/auth/googleopenidconnect" class="btn btn-primary" id="openid_connect">Log in with Google</a>
153
                                        <p>If you do not have a Google account, but do have a local account, you can still log in: </p>
154
                                [% END # / IF GoogleOpenIdConnect %]
155
                            [% END # / UNLESS opacShibOnly %]
142
156
143
                        [% IF ( Koha.Preference('GoogleOpenIDConnect') == 1 ) %]
157
                            [% IF SCO_login or SCI_login %]
144
                            [% IF ( invalidGoogleOpenIDConnectLogin ) %]
158
                                [% IF SCO_login %]
145
                                <h4>Google login</h4>
159
                                <form action="/cgi-bin/koha/sco/sco-main.pl" name="auth" id="auth" method="post" autocomplete="off">
146
                                <p>Sorry, your Google login failed. <span class="error">[% invalidGoogleOpenIDConnectLogin | html %]</span></p>
160
                                [% ELSIF SCI_login %]
147
                                <p>Please note that the Google login will only work if you are using the e-mail address registered with this library.</p>
161
                                <form action="/cgi-bin/koha/sci/sci-main.pl" name="auth" id="auth" method="post" autocomplete="off">
148
                                <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>
162
                                [% END %]
149
                            [% END %]
163
                                <input type="hidden" name="koha_login_context" value="opac" />
150
                                <a href="/cgi-bin/koha/svc/auth/googleopenidconnect" class="btn btn-primary" id="openid_connect">Log in with Google</a>
164
                                <fieldset class="brief">
151
                                <p>If you do not have a Google account, but do have a local account, you can still log in: </p>
165
                                [% FOREACH INPUT IN INPUTS %]
152
                        [% END %]
166
                                    <input type="hidden" name="[% INPUT.name | html %]" value="[% INPUT.value | html %]" />
167
                                [% END %]
168
                                <label for="userid">Login</label>
169
                                <input type="text"  size="25" id="userid"  name="userid" />
170
                                <label for="password">Password</label><input type="password"  size="25" id="password"  name="password" />
171
                                </fieldset>
153
172
154
                        [% IF SCO_login %]
173
                                <input type="submit" value="Log in" class="btn" />
155
                            <form action="/cgi-bin/koha/sco/sco-main.pl" name="auth" id="auth" method="post" autocomplete="off">
174
                                </div>
156
                        [% ELSIF SCI_login %]
175
                                </form>
157
                            <form action="/cgi-bin/koha/sci/sci-main.pl" name="auth" id="auth" method="post" autocomplete="off">
176
158
                        [% ELSE %]
177
                            [% ELSE # / IF SCO_login or SCI_login %]
178
                            [% UNLESS ( Koha.Preference('opacShibOnly') ) %]
159
                            <form action="[% script_name | html %]" name="auth" id="auth" method="post" autocomplete="off">
179
                            <form action="[% script_name | html %]" name="auth" id="auth" method="post" autocomplete="off">
160
                        [% END %]
161
                            <input type="hidden" name="koha_login_context" value="opac" />
180
                            <input type="hidden" name="koha_login_context" value="opac" />
162
                            <fieldset class="brief">
181
                            <fieldset class="brief">
163
                            [% FOREACH INPUT IN INPUTS %]
182
                            [% FOREACH INPUT IN INPUTS %]
Lines 175-180 Link Here
175
                                    <a href="/cgi-bin/koha/opac-password-recovery.pl">Forgot your password?</a>
194
                                    <a href="/cgi-bin/koha/opac-password-recovery.pl">Forgot your password?</a>
176
                                </div>
195
                                </div>
177
                            [% END %]
196
                            [% END %]
197
                            </form>
198
                            [% END # / UNLESS opacShibOnly %]
178
                            <div id="nologininstructions">
199
                            <div id="nologininstructions">
179
                            [% IF Koha.Preference('OpacLoginInstructions') %]
200
                            [% IF Koha.Preference('OpacLoginInstructions') %]
180
                                [% Koha.Preference('OpacLoginInstructions') | $raw %]
201
                                [% Koha.Preference('OpacLoginInstructions') | $raw %]
Lines 185-194 Link Here
185
                                <p>If you don't have a library card, stop by your local library to sign up.</p>
206
                                <p>If you don't have a library card, stop by your local library to sign up.</p>
186
                            [% END # / IF Koha.Preference('OpacLoginInstructions') %]
207
                            [% END # / IF Koha.Preference('OpacLoginInstructions') %]
187
208
188
                            [% IF PatronSelfRegistration && PatronSelfRegistrationDefaultCategory %]<span id="registrationinstructions"><a href="/cgi-bin/koha/opac-memberentry.pl">You may register here.</a></span>
209
                            [% IF PatronSelfRegistration && PatronSelfRegistrationDefaultCategory %]<span id="registrationinstructions"><a href="/cgi-bin/koha/opac-memberentry.pl">You may register here.</a></span>[% END %]
189
                            [% END %]
190
                            </div>
210
                            </div>
191
                            </form>
211
                            [% END # / IF SCO_login or SCI_login %]
192
                        [% END # / IF loginprompt %]
212
                        [% END # / IF loginprompt %]
193
213
194
                    [% ELSE %]
214
                    [% ELSE %]
195
- 

Return to bug 18506