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

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc (-78 / +80 lines)
Lines 387-472 Link Here
387
        </div> <!-- /.container-fluid -->
387
        </div> <!-- /.container-fluid -->
388
    [% END # / OpacPublic %]
388
    [% END # / OpacPublic %]
389
389
390
    <!-- Login form hidden by default, used for modal window -->
390
    [% IF ( Koha.Preference( 'opacuserlogin' ) == 1 ) %]
391
    <div id="loginModal" class="modal" tabindex="-1" role="dialog" aria-labelledby="modalLoginLabel" aria-hidden="true">
391
        <!-- Login form hidden by default, used for modal window -->
392
        <div class="modal-dialog">
392
        <div id="loginModal" class="modal" tabindex="-1" role="dialog" aria-labelledby="modalLoginLabel" aria-hidden="true">
393
            <div class="modal-content">
393
            <div class="modal-dialog">
394
                <div class="modal-header">
394
                <div class="modal-content">
395
                    <h1 class="modal-title" id="modalLoginLabel">Log in to your account</h1>
395
                    <div class="modal-header">
396
                    <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
396
                        <h1 class="modal-title" id="modalLoginLabel">Log in to your account</h1>
397
                </div>
397
                        <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
398
                <form action="/cgi-bin/koha/opac-user.pl" method="post" name="auth" id="modalAuth">
398
                    </div>
399
                    [% INCLUDE 'csrf-token.inc' %]
399
                    <form action="/cgi-bin/koha/opac-user.pl" method="post" name="auth" id="modalAuth">
400
                    <input type="hidden" name="has-search-query" id="has-search-query" value="" />
400
                        [% INCLUDE 'csrf-token.inc' %]
401
                    <div class="modal-body">
401
                        <input type="hidden" name="has-search-query" id="has-search-query" value="" />
402
                        [% IF ( Koha.Preference('GoogleOpenIDConnect') == 1 ) %]
402
                        <div class="modal-body">
403
                            <a href="/cgi-bin/koha/svc/auth/googleopenidconnect" class="btn btn-light" id="openid_connect"><i class="fa-brands fa-google" aria-hidden="true"></i> Log in with Google</a>
403
                            [% IF ( Koha.Preference('GoogleOpenIDConnect') == 1 ) %]
404
                            <p>If you do not have a Google account, but do have a local account, you can still log in: </p>
404
                                <a href="/cgi-bin/koha/svc/auth/googleopenidconnect" class="btn btn-light" id="openid_connect"><i class="fa-brands fa-google" aria-hidden="true"></i> Log in with Google</a>
405
                        [% END # /IF GoogleOpenIDConnect %]
405
                                <p>If you do not have a Google account, but do have a local account, you can still log in: </p>
406
                        [% IF ( shibbolethAuthentication ) %]
406
                            [% END # /IF GoogleOpenIDConnect %]
407
                            [% IF ( invalidShibLogin ) %]
407
                            [% IF ( shibbolethAuthentication ) %]
408
                                <!-- This is what is displayed if shibboleth login has failed to match a koha user -->
408
                                [% IF ( invalidShibLogin ) %]
409
                                <div class="alert alert-info">
409
                                    <!-- This is what is displayed if shibboleth login has failed to match a koha user -->
410
                                    <p>Sorry, your Shibboleth identity does not match a valid library identity. If you have a local login, you may use that below.</p>
410
                                    <div class="alert alert-info">
411
                                </div>
411
                                        <p>Sorry, your Shibboleth identity does not match a valid library identity. If you have a local login, you may use that below.</p>
412
                            [% ELSE %]
413
                                <h3 class="shib_title">Shibboleth login</h3>
414
                                <p><a id="shib_url" class="shib_url" href="[% shibbolethLoginUrl | $raw %]">Log in using a Shibboleth account</a>.</p>
415
                                [% UNLESS Koha.Preference('opacShibOnly') %]
416
                                    <h3 class="shib_local_title">Local login</h3>
417
                                [% END %]
418
                            [% END %]
419
                        [% END %]
420
                        [% UNLESS Koha.Preference('opacShibOnly') %]
421
                            [% SET identity_providers = AuthClient.get_providers('opac') %]
422
                            [% IF ( ! identity_providers.empty ) %]
423
                                [% FOREACH provider IN identity_providers %]
424
                                    <p class="clearfix">
425
                                        <a href="[% provider.url | url %]" class="btn btn-light col-md-12" id="provider_[% provider.code | html %]">
426
                                            [% IF provider.icon_url %]
427
                                            <img src="[% provider.icon_url | url %]" />
428
                                            [% ELSE %]
429
                                            <i class="fa fa-user" aria-hidden="true"></i>
430
                                            [% END %]
431
                                            Log in with [% provider.description | html %]
432
                                        </a>
433
                                    </p>
434
                                [% END %]
435
                                <hr/>
436
                                <p>If you do not have an external account, but do have a local account, you can still log in: </p>
437
                            [% END # /IF  identity_providers.size %]
438
                            <input type="hidden" name="koha_login_context" value="opac" />
439
                            <fieldset class="brief">
440
                                <div class="local-login">
441
                                    [% PROCESS login_label for="muserid" %]<input type="text" id="muserid" name="login_userid" autocomplete="off" />
442
                                    <label for="mpassword">Password:</label><input type="password" id="mpassword" name="login_password" autocomplete="off" />
443
                                    <fieldset class="action">
444
                                        <input type="hidden" name="op" value="cud-login" />
445
                                        <input type="submit" class="btn btn-primary" value="Log in" />
446
                                    </fieldset>
447
                                </div>
448
                                [% IF OpacLoginInstructions %]
449
                                    <div id="nologininstructions-modal" class="nologininstructions">
450
                                        [% PROCESS koha_news_block news => OpacLoginInstructions %]
451
                                    </div>
452
                                [% END %]
453
                                [% IF Koha.Preference('OpacPasswordChange') && Categories.can_any_reset_password %]
454
                                    <div id="forgotpassword-modal" class="forgotpassword">
455
                                        <p><a href="/cgi-bin/koha/opac-password-recovery.pl">Forgot your password?</a></p>
456
                                    </div>
412
                                    </div>
413
                                [% ELSE %]
414
                                    <h3 class="shib_title">Shibboleth login</h3>
415
                                    <p><a id="shib_url" class="shib_url" href="[% shibbolethLoginUrl | $raw %]">Log in using a Shibboleth account</a>.</p>
416
                                    [% UNLESS Koha.Preference('opacShibOnly') %]
417
                                        <h3 class="shib_local_title">Local login</h3>
418
                                    [% END %]
457
                                [% END %]
419
                                [% END %]
458
                                [% IF Koha.Preference('PatronSelfRegistration') && Categories.all( categorycode => Koha.Preference('PatronSelfRegistrationDefaultCategory') ).count %]
420
                            [% END %]
459
                                    <div id="patronregistration-modal" class="patronregistration">
421
                            [% UNLESS Koha.Preference('opacShibOnly') %]
460
                                        <p><a href="/cgi-bin/koha/opac-memberentry.pl">Create an account</a></p>
422
                                [% SET identity_providers = AuthClient.get_providers('opac') %]
423
                                [% IF ( ! identity_providers.empty ) %]
424
                                    [% FOREACH provider IN identity_providers %]
425
                                        <p class="clearfix">
426
                                            <a href="[% provider.url | url %]" class="btn btn-light col-md-12" id="provider_[% provider.code | html %]">
427
                                                [% IF provider.icon_url %]
428
                                                <img src="[% provider.icon_url | url %]" />
429
                                                [% ELSE %]
430
                                                <i class="fa fa-user" aria-hidden="true"></i>
431
                                                [% END %]
432
                                                Log in with [% provider.description | html %]
433
                                            </a>
434
                                        </p>
435
                                    [% END %]
436
                                    <hr/>
437
                                    <p>If you do not have an external account, but do have a local account, you can still log in: </p>
438
                                [% END # /IF  identity_providers.size %]
439
                                <input type="hidden" name="koha_login_context" value="opac" />
440
                                <fieldset class="brief">
441
                                    <div class="local-login">
442
                                        [% PROCESS login_label for="muserid" %]<input type="text" id="muserid" name="login_userid" autocomplete="off" />
443
                                        <label for="mpassword">Password:</label><input type="password" id="mpassword" name="login_password" autocomplete="off" />
444
                                        <fieldset class="action">
445
                                            <input type="hidden" name="op" value="cud-login" />
446
                                            <input type="submit" class="btn btn-primary" value="Log in" />
447
                                        </fieldset>
461
                                    </div>
448
                                    </div>
462
                                [% END %]
449
                                    [% IF OpacLoginInstructions %]
463
                            </fieldset>
450
                                        <div id="nologininstructions-modal" class="nologininstructions">
464
                        [% END %]
451
                                            [% PROCESS koha_news_block news => OpacLoginInstructions %]
465
                    </div>
452
                                        </div>
466
                </form> <!-- /#auth -->
453
                                    [% END %]
467
            </div> <!-- /.modal-content -->
454
                                    [% IF Koha.Preference('OpacPasswordChange') && Categories.can_any_reset_password %]
468
        </div> <!-- /.modal-dialog -->
455
                                        <div id="forgotpassword-modal" class="forgotpassword">
469
    </div>  <!-- /#modalAuth  -->
456
                                            <p><a href="/cgi-bin/koha/opac-password-recovery.pl">Forgot your password?</a></p>
457
                                        </div>
458
                                    [% END %]
459
                                    [% IF Koha.Preference('PatronSelfRegistration') && Categories.all( categorycode => Koha.Preference('PatronSelfRegistrationDefaultCategory') ).count %]
460
                                        <div id="patronregistration-modal" class="patronregistration">
461
                                            <p><a href="/cgi-bin/koha/opac-memberentry.pl">Create an account</a></p>
462
                                        </div>
463
                                    [% END %]
464
                                </fieldset>
465
                            [% END %]
466
                        </div>
467
                    </form> <!-- /#auth -->
468
                </div> <!-- /.modal-content -->
469
            </div> <!-- /.modal-dialog -->
470
        </div>  <!-- /#modalAuth  -->
471
    [% END # / IF opacuserlogin %]
472
470
    [% IF Koha.Preference( 'CookieConsent' ) %]
473
    [% IF Koha.Preference( 'CookieConsent' ) %]
471
            <!-- Cookie consent bar -->
474
            <!-- Cookie consent bar -->
472
            <div id="cookieConsentBar" aria-hidden="true">
475
            <div id="cookieConsentBar" aria-hidden="true">
473
- 

Return to bug 38544