Bugzilla – Attachment 16069 Details for
Bug 6739
expired patrons not blocked from opac actions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 6739 - expired patrons not blocked from opac actions - Followup
Bug-6739---expired-patrons-not-blocked-from-opac-a.patch (text/plain), 6.29 KB, created by
Kyle M Hall (khall)
on 2013-03-12 17:47:01 UTC
(
hide
)
Description:
Bug 6739 - expired patrons not blocked from opac actions - Followup
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2013-03-12 17:47:01 UTC
Size:
6.29 KB
patch
obsolete
>From 95cb5ee7c4aa9ff664da48683815e9d7c3455d63 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Tue, 12 Mar 2013 13:46:41 -0400 >Subject: [PATCH] Bug 6739 - expired patrons not blocked from opac actions - Followup > >--- > .../prog/en/modules/admin/categorie.tt | 20 +++++++++++++++++--- > koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt | 18 +++++++++++++++--- > opac/opac-renew.pl | 2 +- > opac/opac-user.pl | 5 +---- > 4 files changed, 34 insertions(+), 11 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tt >index 0755b62..4b18ed8 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tt >@@ -207,9 +207,23 @@ > </li> > <li><label for="block_expired">Block expired patrons</label> > <select name="block_expired" id="block_expired"> >- <option value="-1" [% IF ( BlockExpiredPatronOpacActions == -1 ) %] selected="selected" [% END %]> Follow system preference BlockExpiredPatronOpacActions </option> >- <option value="1" [% IF ( BlockExpiredPatronOpacActions == 1 ) %] selected="selected" [% END %]> Block </option> >- <option value="0" [% IF ( BlockExpiredPatronOpacActions == 0 ) %] selected="selected" [% END %]> Don't block </option> >+ [% IF ( BlockExpiredPatronOpacActions == -1 ) %] >+ <option value="-1" selected="selected"> Follow system preference BlockExpiredPatronOpacActions </option> >+ [% ELSE %] >+ <option value="-1"> Follow system preference BlockExpiredPatronOpacActions </option> >+ [% END %] >+ >+ [% IF ( BlockExpiredPatronOpacActions == 1 ) %] >+ <option value="1" selected="selected"> Block </option> >+ [% ELSE %] >+ <option value="1"> Block </option> >+ [% END %] >+ >+ [% IF ( BlockExpiredPatronOpacActions == 0 ) %] >+ <option value="0" selected="selected"> Don't block </option> >+ [% ELSE %] >+ <option value="0"> Don't block </option> >+ [% END %] > </select> > Should patrons of this category be blocked from opac actions such as renew and reserve when their cards have expired. > </li> >diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt >index 7d0f003..89fdc27 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt >+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt >@@ -94,17 +94,29 @@ $.tablesorter.addParser({ > > [% IF ( BORROWER_INF.warnexpired ) %] > <div class="dialog alert" id="warnexpired"> >- <strong>Please note:</strong><span> Your card has expired. Please contact the library for more information.</span> >+ <strong>Please note:</strong><span> Your account has expired. Please contact the library for more information.</span> > </div> > [% ELSIF ( BORROWER_INF.warnexpired ) %] > <div class="dialog alert"> >- <string>Please note:</string><span> You card has expired as of [% BORROWER_INF.warnexpired %]. Please contact the library if you wish to renew your subscription.</span> >+ <strong>Please note:</strong><span> You account has expired as of [% BORROWER_INF.warnexpired %]. Please contact the library if you wish to renew your account.</span> > </div> > [% END %] > > [% IF ( RENEW_ERROR ) %] > <div class="dialog alert"> >- <string>Please note:</string><span> You're renew failed with the following error: [% RENEW_ERROR %]</span> >+ <string>Please note:</string> >+ <span> >+ Your account renewal failed because of the following: >+ [% FOREACH error IN RENEW_ERROR.split('|') %] >+ [% IF error == 'card_expired' %] >+ Your account has expired. Please contact the library for more information. >+ [% ELSIF error == 'too_many' %] >+ You have renewed this item the maximum number of times allowed. >+ [% ELSIF error == 'on_reserve' %] >+ This item is on hold for another patron. >+ [% END %] >+ [% END %] >+ </span> > </div> > [% END %] > >diff --git a/opac/opac-renew.pl b/opac/opac-renew.pl >index 39d7c03..67be7d7 100755 >--- a/opac/opac-renew.pl >+++ b/opac/opac-renew.pl >@@ -51,7 +51,7 @@ my $member_details = GetMemberDetails($borrowernumber); > # BlockExpiredPatronOpacActions syspref 0 is false, 1 is true. BlockExpiredPatronOpacActions for categories (from GetMemberDetails) -1 means use syspref, 0 is false, 1 is true (where false means dont block, true means block) > if( ($member_details->{'BlockExpiredPatronOpacActions'} == -1 ? C4::Conext->preference('BlockExpiredPatronOpacActions') : $member_details->{'BlockExpiredPatronOpacActions'}) > && Date_to_Days( Today() ) > Date_to_Days( split /-/, $member_details->{'dateexpiry'} ) ){ >- $errorstring='unable to renew as your card has expired'; >+ $errorstring = 'card_expired'; > } else { > for my $itemnumber ( @items ) { > my ($status,$error) = CanBookBeRenewed( $borrowernumber, $itemnumber ); >diff --git a/opac/opac-user.pl b/opac/opac-user.pl >index c4b5de3..5a8ff7c 100755 >--- a/opac/opac-user.pl >+++ b/opac/opac-user.pl >@@ -137,16 +137,13 @@ if ( $borr->{'dateexpiry'} && C4::Context->preference('NotifyBorrowerDeparture') > } > } > >-# pass on any renew errors to the template for displaying >-$template->param( RENEW_ERROR => $query->param('renew_error') ) if $query->param('renew_error'); >- > $template->param( BORROWER_INFO => \@bordat, > borrowernumber => $borrowernumber, > patron_flagged => $borr->{flagged}, > OPACMySummaryHTML => (C4::Context->preference("OPACMySummaryHTML")) ? 1 : 0, > surname => $borr->{surname}, > showname => $borr->{showname}, >- >+ RENEW_ERROR => $query->param('renew_error'), > ); > > #get issued items .... >-- >1.7.2.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 6739
:
7814
|
9108
|
16061
|
16063
|
16064
|
16065
|
16069
|
16071
|
16072
|
17356
|
17357
|
17463
|
17464
|
17466
|
17517
|
17518
|
17907
|
17908
|
17909
|
18041
|
18042
|
18043
|
19553
|
19554
|
19555
|
19558
|
19559
|
19560
|
19678
|
19679
|
19993
|
19994
|
19995
|
19996
|
19997
|
20641
|
20642
|
20643
|
20644
|
20645
|
21312
|
21313
|
21314
|
21315
|
21316
|
21317
|
24385
|
24386
|
24387
|
24388
|
24389
|
24390
|
24391
|
24392
|
25158
|
25159
|
25160
|
25161
|
25162
|
25163
|
25164
|
25165
|
25231
|
25232
|
25233
|
26546
|
26547
|
26548
|
26549
|
26550
|
26551
|
26552
|
26553
|
26836
|
26837
|
26838
|
26839
|
26840
|
26841
|
26842
|
26843