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

(-)a/C4/Auth.pm (-2 / +2 lines)
Lines 1137-1143 sub checkauth { Link Here
1137
                    (
1137
                    (
1138
                        ( $type eq 'opac' )
1138
                        ( $type eq 'opac' )
1139
                        && C4::Context->preference('OPACShibOnly')
1139
                        && C4::Context->preference('OPACShibOnly')
1140
			&& C4::Context->preference('SelfCheckoutByLogin') ne 'shibboleth'
1140
                        && !$query->param('sco_user_login')
1141
                    )
1141
                    )
1142
                    || ( ( $type ne 'opac' )
1142
                    || ( ( $type ne 'opac' )
1143
                        && C4::Context->preference('staffShibOnly') )
1143
                        && C4::Context->preference('staffShibOnly') )
Lines 1457-1463 sub checkauth { Link Here
1457
1457
1458
    if ($shib) {
1458
    if ($shib) {
1459
        #If shibOnly is enabled just go ahead and redirect directly
1459
        #If shibOnly is enabled just go ahead and redirect directly
1460
        if ( (($type eq 'opac') && C4::Context->preference('OPACShibOnly')) || (($type ne 'opac') && C4::Context->preference('staffShibOnly')) ) {
1460
        if ( (($type eq 'opac') && C4::Context->preference('OPACShibOnly') && !$query->param('sco_user_login') ) || (($type ne 'opac') && C4::Context->preference('staffShibOnly')) ) {
1461
            my $redirect_url = login_shib_url( $query );
1461
            my $redirect_url = login_shib_url( $query );
1462
            print $query->redirect( -uri => "$redirect_url", -status => 303 );
1462
            print $query->redirect( -uri => "$redirect_url", -status => 303 );
1463
            safe_exit;
1463
            safe_exit;
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt (-3 / +3 lines)
Lines 233-239 Link Here
233
                                [% END %]
233
                                [% END %]
234
                            [% END %]
234
                            [% END %]
235
235
236
                            [% IF ( nouser ) %]
236
                            [% IF ( nouser && shib_only == 0 ) %]
237
                                <div class="alert alert-warning">
237
                                <div class="alert alert-warning">
238
                                    <h3>Sorry</h3>
238
                                    <h3>Sorry</h3>
239
                                    <p>The userid <strong>[% patronid | html %]</strong> was not found in the database.  Please try again.</p>
239
                                    <p>The userid <strong>[% patronid | html %]</strong> was not found in the database.  Please try again.</p>
Lines 404-410 Link Here
404
                            <div class="sco_entry" >
404
                            <div class="sco_entry" >
405
                                <form id="mainform" action="/cgi-bin/koha/sco/sco-main.pl" name="mainform" method="post">
405
                                <form id="mainform" action="/cgi-bin/koha/sco/sco-main.pl" name="mainform" method="post">
406
                                    <fieldset>
406
                                    <fieldset>
407
                                        [% IF ( Koha.Preference('SelfCheckoutByLogin') ) %]
407
                                        [% IF ( Koha.Preference('SelfCheckoutByLogin') == 'username' ) %]
408
                                            <legend>Log in to your account</legend>
408
                                            <legend>Log in to your account</legend>
409
                                            <label for="patronlogin">Login:</label>
409
                                            <label for="patronlogin">Login:</label>
410
                                            <input type="text" id="patronlogin" class="focus noEnterSubmit" size="20" name="patronlogin" autocomplete="off"/>
410
                                            <input type="text" id="patronlogin" class="focus noEnterSubmit" size="20" name="patronlogin" autocomplete="off"/>
Lines 413-419 Link Here
413
                                            <fieldset class="action">
413
                                            <fieldset class="action">
414
                                                <button type="submit" class="btn btn-primary">Log in</button>
414
                                                <button type="submit" class="btn btn-primary">Log in</button>
415
                                            </fieldset>
415
                                            </fieldset>
416
                                        [% ELSE %]
416
                                        [% ELSIF ( Koha.Preference('SelfCheckoutByLogin') == 'cardnumber' )  %]
417
                                            <div class="form-row">
417
                                            <div class="form-row">
418
                                                <div class="col-auto">
418
                                                <div class="col-auto">
419
                                                    <label for="patronid">Please enter your card number:</label>
419
                                                    <label for="patronid">Please enter your card number:</label>
(-)a/opac/sco/sco-main.pl (-1 / +2 lines)
Lines 383-389 if ( $patron) { Link Here
383
        ) if $patron_image;
383
        ) if $patron_image;
384
    }
384
    }
385
} else {
385
} else {
386
    my $shib_only = C4::Context->preference('OPACShibOnly');
386
    $template->param(
387
    $template->param(
388
        shib_only  => $shib_only,
387
        nouser     => $patronid,
389
        nouser     => $patronid,
388
    );
390
    );
389
}
391
}
390
- 

Return to bug 30444