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

(-)a/C4/Circulation.pm (-1 / +1 lines)
Lines 4668-4674 sub _CanBookBeAutoRenewed { Link Here
4668
        }
4668
        }
4669
    );
4669
    );
4670
4670
4671
    if ( $patron->is_expired && $patron->category->effective_BlockExpiredPatronOpacActions ) {
4671
    if ( $patron->is_expired && $patron->category->effective_BlockExpiredPatronOpacActions_contains('renew') ) {
4672
        return 'auto_account_expired';
4672
        return 'auto_account_expired';
4673
    }
4673
    }
4674
4674
(-)a/C4/ILSDI/Services.pm (-2 / +4 lines)
Lines 751-757 sub HoldTitle { Link Here
751
    return { code => 'PatronRestricted' } if $patron->is_debarred;
751
    return { code => 'PatronRestricted' } if $patron->is_debarred;
752
752
753
    # Check for patron expired, category and syspref settings
753
    # Check for patron expired, category and syspref settings
754
    return { code => 'PatronExpired' } if ($patron->category->effective_BlockExpiredPatronOpacActions && $patron->is_expired);
754
    return { code => 'PatronExpired' }
755
        if ( $patron->category->effective_BlockExpiredPatronOpacActions_contains('hold') && $patron->is_expired );
755
756
756
    # Get the biblio record, or return an error code
757
    # Get the biblio record, or return an error code
757
    my $biblionumber = $cgi->param('bib_id');
758
    my $biblionumber = $cgi->param('bib_id');
Lines 855-861 sub HoldItem { Link Here
855
    return { code => 'PatronRestricted' } if $patron->is_debarred;
856
    return { code => 'PatronRestricted' } if $patron->is_debarred;
856
857
857
    # Check for patron expired, category and syspref settings
858
    # Check for patron expired, category and syspref settings
858
    return { code => 'PatronExpired' } if ($patron->category->effective_BlockExpiredPatronOpacActions && $patron->is_expired);
859
    return { code => 'PatronExpired' }
860
        if ( $patron->category->effective_BlockExpiredPatronOpacActions_contains('hold') && $patron->is_expired );
859
861
860
    # Get the biblio or return an error code
862
    # Get the biblio or return an error code
861
    my $biblionumber = $cgi->param('bib_id');
863
    my $biblionumber = $cgi->param('bib_id');
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt (-4 / +4 lines)
Lines 342-348 Link Here
342
                                                        <th>Barcode</th>
342
                                                        <th>Barcode</th>
343
                                                    [% END %]
343
                                                    [% END %]
344
                                                        <th>Call number</th>
344
                                                        <th>Call number</th>
345
                                                    [% IF ( OpacRenewalAllowed && !( logged_in_user.is_expired && logged_in_user.category.effective_BlockExpiredPatronOpacActions ) ) %]
345
                                                    [% IF ( OpacRenewalAllowed && !( logged_in_user.is_expired && logged_in_user.category.effective_BlockExpiredPatronOpacActions_contains('renew') ) ) %]
346
                                                        <th>Renew</th>
346
                                                        <th>Renew</th>
347
                                                    [% END %]
347
                                                    [% END %]
348
                                                    [% IF ( OPACFinesTab ) %]
348
                                                    [% IF ( OPACFinesTab ) %]
Lines 444-450 Link Here
444
                                                        <span class="tdlabel">Call number:</span>
444
                                                        <span class="tdlabel">Call number:</span>
445
                                                        [% ISSUE.itemcallnumber | html %]
445
                                                        [% ISSUE.itemcallnumber | html %]
446
                                                    </td>
446
                                                    </td>
447
                                                    [% IF ( OpacRenewalAllowed && !( logged_in_user.is_expired && logged_in_user.category.effective_BlockExpiredPatronOpacActions ) ) %]
447
                                                    [% IF ( OpacRenewalAllowed && !( logged_in_user.is_expired && logged_in_user.category.effective_BlockExpiredPatronOpacActions_contains('renew') ) ) %]
448
                                                        [% IF ( ISSUE.status && canrenew ) %]
448
                                                        [% IF ( ISSUE.status && canrenew ) %]
449
                                                            <td class="renew" data-order="[% ISSUE.renewsleft | html %]">
449
                                                            <td class="renew" data-order="[% ISSUE.renewsleft | html %]">
450
                                                        [% ELSE %]
450
                                                        [% ELSE %]
Lines 550-563 Link Here
550
                                                [% END # /FOREACH ISSUES %]
550
                                                [% END # /FOREACH ISSUES %]
551
                                            </tbody>
551
                                            </tbody>
552
                                        </table>
552
                                        </table>
553
                                        [% IF ( canrenew && !userdebarred && OpacRenewalAllowed && !( logged_in_user.is_expired && logged_in_user.category.effective_BlockExpiredPatronOpacActions ) ) %]
553
                                        [% IF ( canrenew && !userdebarred && OpacRenewalAllowed && !( logged_in_user.is_expired && logged_in_user.category.effective_BlockExpiredPatronOpacActions_contains('renew') ) ) %]
554
                                            <input type="submit" class="btn btn-primary d-print-none" value="Renew selected" />
554
                                            <input type="submit" class="btn btn-primary d-print-none" value="Renew selected" />
555
                                            <input type="hidden" name="op" value="cud-renew" />
555
                                            <input type="hidden" name="op" value="cud-renew" />
556
                                            <button type="button" id="renewall_js" class="btn btn-primary d-print-none">Renew all</button>
556
                                            <button type="button" id="renewall_js" class="btn btn-primary d-print-none">Renew all</button>
557
                                        [% END %]
557
                                        [% END %]
558
                                    </form>
558
                                    </form>
559
559
560
                                    [% IF ( canrenew && !userdebarred && OpacRenewalAllowed && !( logged_in_user.is_expired && logged_in_user.category.effective_BlockExpiredPatronOpacActions ) ) %]
560
                                    [% IF ( canrenew && !userdebarred && OpacRenewalAllowed && !( logged_in_user.is_expired && logged_in_user.category.effective_BlockExpiredPatronOpacActions_contains('renew') ) ) %]
561
                                        <form id="renewall" class="js-hide" action="/cgi-bin/koha/opac-renew.pl" method="post">
561
                                        <form id="renewall" class="js-hide" action="/cgi-bin/koha/opac-renew.pl" method="post">
562
                                            [% INCLUDE 'csrf-token.inc' %]
562
                                            [% INCLUDE 'csrf-token.inc' %]
563
                                            <legend class="sr-only">Renew</legend>
563
                                            <legend class="sr-only">Renew</legend>
(-)a/opac/opac-renew.pl (-1 / +1 lines)
Lines 51-57 my $renewed = q{}; Link Here
51
51
52
my $patron = Koha::Patrons->find( $borrowernumber );
52
my $patron = Koha::Patrons->find( $borrowernumber );
53
53
54
if (   $patron->category->effective_BlockExpiredPatronOpacActions
54
if (   $patron->category->effective_BlockExpiredPatronOpacActions_contains('renew')
55
    && $patron->is_expired )
55
    && $patron->is_expired )
56
{
56
{
57
    $errorstring = 'card_expired';
57
    $errorstring = 'card_expired';
(-)a/opac/opac-reserve.pl (-2 / +1 lines)
Lines 113-119 if ( $#biblionumbers < 0 && $op ne 'cud-place_reserve' ) { Link Here
113
#
113
#
114
#
114
#
115
my $noreserves     = 0;
115
my $noreserves     = 0;
116
if ( $category->effective_BlockExpiredPatronOpacActions ) {
116
if ( $category->effective_BlockExpiredPatronOpacActions_contains('hold') ) {
117
    if ( $patron->is_expired ) {
117
    if ( $patron->is_expired ) {
118
        # cannot reserve, their card has expired and the rules set mean this is not allowed
118
        # cannot reserve, their card has expired and the rules set mean this is not allowed
119
        $noreserves = 1;
119
        $noreserves = 1;
120
- 

Return to bug 36453