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

(-)a/C4/Circulation.pm (-1 / +1 lines)
Lines 4571-4577 sub _CanBookBeAutoRenewed { Link Here
4571
        }
4571
        }
4572
    );
4572
    );
4573
4573
4574
    if ( $patron->is_expired && $patron->category->effective_BlockExpiredPatronOpacActions ) {
4574
    if ( $patron->is_expired && $patron->category->effective_BlockExpiredPatronOpacActions_contains('renew') ) {
4575
        return 'auto_account_expired';
4575
        return 'auto_account_expired';
4576
    }
4576
    }
4577
4577
(-)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 334-340 Link Here
334
                                                        <th>Barcode</th>
334
                                                        <th>Barcode</th>
335
                                                    [% END %]
335
                                                    [% END %]
336
                                                        <th>Call number</th>
336
                                                        <th>Call number</th>
337
                                                    [% IF ( OpacRenewalAllowed && !( logged_in_user.is_expired && logged_in_user.category.effective_BlockExpiredPatronOpacActions ) ) %]
337
                                                    [% IF ( OpacRenewalAllowed && !( logged_in_user.is_expired && logged_in_user.category.effective_BlockExpiredPatronOpacActions_contains('renew') ) ) %]
338
                                                        <th>Renew</th>
338
                                                        <th>Renew</th>
339
                                                    [% END %]
339
                                                    [% END %]
340
                                                    [% IF ( OPACFinesTab ) %]
340
                                                    [% IF ( OPACFinesTab ) %]
Lines 436-442 Link Here
436
                                                        <span class="tdlabel">Call number:</span>
436
                                                        <span class="tdlabel">Call number:</span>
437
                                                        [% ISSUE.itemcallnumber | html %]
437
                                                        [% ISSUE.itemcallnumber | html %]
438
                                                    </td>
438
                                                    </td>
439
                                                    [% IF ( OpacRenewalAllowed && !( logged_in_user.is_expired && logged_in_user.category.effective_BlockExpiredPatronOpacActions ) ) %]
439
                                                    [% IF ( OpacRenewalAllowed && !( logged_in_user.is_expired && logged_in_user.category.effective_BlockExpiredPatronOpacActions_contains('renew') ) ) %]
440
                                                        [% IF ( ISSUE.status && canrenew ) %]
440
                                                        [% IF ( ISSUE.status && canrenew ) %]
441
                                                            <td class="renew" data-order="[% ISSUE.renewsleft | html %]">
441
                                                            <td class="renew" data-order="[% ISSUE.renewsleft | html %]">
442
                                                        [% ELSE %]
442
                                                        [% ELSE %]
Lines 542-555 Link Here
542
                                                [% END # /FOREACH ISSUES %]
542
                                                [% END # /FOREACH ISSUES %]
543
                                            </tbody>
543
                                            </tbody>
544
                                        </table>
544
                                        </table>
545
                                        [% IF ( canrenew && !userdebarred && OpacRenewalAllowed && !( logged_in_user.is_expired && logged_in_user.category.effective_BlockExpiredPatronOpacActions ) ) %]
545
                                        [% IF ( canrenew && !userdebarred && OpacRenewalAllowed && !( logged_in_user.is_expired && logged_in_user.category.effective_BlockExpiredPatronOpacActions_contains('renew') ) ) %]
546
                                            <input type="submit" class="btn btn-primary" value="Renew selected" />
546
                                            <input type="submit" class="btn btn-primary" value="Renew selected" />
547
                                            <input type="hidden" name="op" value="cud-renew" />
547
                                            <input type="hidden" name="op" value="cud-renew" />
548
                                            <button type="button" id="renewall_js" class="btn btn-primary">Renew all</button>
548
                                            <button type="button" id="renewall_js" class="btn btn-primary">Renew all</button>
549
                                        [% END %]
549
                                        [% END %]
550
                                    </form>
550
                                    </form>
551
551
552
                                    [% IF ( canrenew && !userdebarred && OpacRenewalAllowed && !( logged_in_user.is_expired && logged_in_user.category.effective_BlockExpiredPatronOpacActions ) ) %]
552
                                    [% IF ( canrenew && !userdebarred && OpacRenewalAllowed && !( logged_in_user.is_expired && logged_in_user.category.effective_BlockExpiredPatronOpacActions_contains('renew') ) ) %]
553
                                        <form id="renewall" class="js-hide" action="/cgi-bin/koha/opac-renew.pl" method="post">
553
                                        <form id="renewall" class="js-hide" action="/cgi-bin/koha/opac-renew.pl" method="post">
554
                                            [% INCLUDE 'csrf-token.inc' %]
554
                                            [% INCLUDE 'csrf-token.inc' %]
555
                                            <legend class="sr-only">Renew</legend>
555
                                            <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 112-118 if ( $#biblionumbers < 0 && $op ne 'cud-place_reserve' ) { Link Here
112
#
112
#
113
#
113
#
114
my $noreserves     = 0;
114
my $noreserves     = 0;
115
if ( $category->effective_BlockExpiredPatronOpacActions ) {
115
if ( $category->effective_BlockExpiredPatronOpacActions_contains('hold') ) {
116
    if ( $patron->is_expired ) {
116
    if ( $patron->is_expired ) {
117
        # cannot reserve, their card has expired and the rules set mean this is not allowed
117
        # cannot reserve, their card has expired and the rules set mean this is not allowed
118
        $noreserves = 1;
118
        $noreserves = 1;
119
- 

Return to bug 36453