Bugzilla – Attachment 30715 Details for
Bug 643
Allow override of 'debarred' status
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 643: Allow override of 'debarred' status
Bug-643-Allow-override-of-debarred-status.patch (text/plain), 6.40 KB, created by
Marc Véron
on 2014-08-11 19:36:38 UTC
(
hide
)
Description:
Bug 643: Allow override of 'debarred' status
Filename:
MIME Type:
Creator:
Marc Véron
Created:
2014-08-11 19:36:38 UTC
Size:
6.40 KB
patch
obsolete
>From 1424a7f3148be5541708790071fcccfb5c5a596a Mon Sep 17 00:00:00 2001 >From: Pasi Kallinen <pasi.kallinen@pttk.fi> >Date: Thu, 22 May 2014 14:38:33 +0300 >Subject: [PATCH] Bug 643: Allow override of 'debarred' status > >Add a button to temporarily override patron debarment. > >To test: >1) Go to patron check out page >2) If patron has been debarred (eg. due to having fees), > there is no way to check out to that patron. >3) Apply patch >4) A debarred patron check out page now has a button for > "Override debarment temporarily" - clicking on it > should allow checking out to that patron. > >Signed-off-by: Aleisha <aleishaamohia@hotmail.com> > >Rebased because patch did not apply >--- > circ/circulation.pl | 18 +++++++++++--- > .../prog/en/modules/circ/circulation.tt | 25 ++++++++++++++++++++ > 2 files changed, 40 insertions(+), 3 deletions(-) > >diff --git a/circ/circulation.pl b/circ/circulation.pl >index c766e88..6c7529d 100755 >--- a/circ/circulation.pl >+++ b/circ/circulation.pl >@@ -97,6 +97,16 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user ( > > my $branches = GetBranches(); > >+my $force_allow_issue = $query->param('forceallow') || 0; >+ >+my @failedrenews = $query->param('failedrenew'); # expected to be itemnumbers >+our %renew_failed = (); >+for (@failedrenews) { $renew_failed{$_} = 1; } >+ >+my @failedreturns = $query->param('failedreturn'); >+our %return_failed = (); >+for (@failedreturns) { $return_failed{$_} = 1; } >+ > my $findborrower = $query->param('findborrower') || q{}; > $findborrower =~ s|,| |g; > my $borrowernumber = $query->param('borrowernumber'); >@@ -231,7 +241,8 @@ if ($borrowernumber) { > #borrowercard expired, no issues > $template->param( > flagged => "1", >- noissues => "1", >+ noissues => ($force_allow_issue) ? 0 : "1", >+ forceallow => $force_allow_issue, > expired => "1", > renewaldate => format_date("$renew_year-$renew_month-$renew_day") > ); >@@ -324,7 +335,7 @@ if ($barcode) { > ); > $blocker = 1; > } >- if( !$blocker ){ >+ if( !$blocker || $force_allow_issue ){ > my $confirm_required = 0; > unless($issueconfirmed){ > # Get the item title for more information >@@ -395,7 +406,8 @@ foreach my $flag ( sort keys %$flags ) { > $flags->{$flag}->{'message'} =~ s#\n#<br />#g; > if ( $flags->{$flag}->{'noissues'} ) { > $template->param( >- noissues => 'true', >+ noissues => ($force_allow_issue) ? 0 : 'true', >+ forceallow => $force_allow_issue, > ); > if ( $flag eq 'GNA' ) { > $template->param( gna => 'true' ); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >index fd65b02..0d3cdec 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >@@ -250,6 +250,8 @@ $(document).ready(function() { > [% IF CAN_user_circulate_force_checkout or HIGHHOLDS %] > <form method="post" action="/cgi-bin/koha/circ/circulation.pl" autocomplete="off"> > >+[% IF (forceallow) %]<input type="hidden" name="forceallow" value="1">[% END %] >+ > [% IF ( RESERVED ) %] > <p> > <input type="checkbox" id="cancelreserve" name="cancelreserve" value="cancel" /> >@@ -289,6 +291,7 @@ $(document).ready(function() { > [% END %] > > <form method="get" action="/cgi-bin/koha/circ/circulation.pl"> >+ [% IF (forceallow) %]<input type="hidden" name="forceallow" value="1">[% END %] > <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" /> > <input type="hidden" name="duedatespec" value="[% duedatespec %]" /> > <input type="hidden" name="stickyduedate" value="[% stickyduedate %]" /> >@@ -338,6 +341,7 @@ $(document).ready(function() { > [% FOREACH book IN options %] > <br /> > <form method="post" action="/cgi-bin/koha/circ/circulation.pl" autocomplete="off"> >+ [% IF (forceallow) %]<input type="hidden" name="forceallow" value="1">[% END %] > <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" /> > <input type="hidden" name="duedatespec" value="[% duedatespec %]" /> > <input type="hidden" name="stickyduedate" value="[% stickyduedate %]" /> >@@ -414,11 +418,20 @@ $(document).ready(function() { > [% END %] > </ul> > >+ [% IF (forceallow) %] >+ <li>Debarment overridden temporarily</li> >+ [% END %] >+ > </div></div> > [% ELSE %] > [% IF ( soundon ) %] > <audio src="[% interface %]/[% theme %]/sound/beep.ogg" autoplay="autoplay" autobuffer="autobuffer"></audio> > [% END %] >+ >+ [% IF (forceallow) %] >+ <div id="overridden_debarment" class="dialog alert">Debarment overridden temporarily</div> >+ [% END %] >+ > [% END %] <!-- /impossible --> > > [% IF ( issued ) %] >@@ -440,6 +453,7 @@ No patron matched <span class="ex">[% message %]</span> > <fieldset id="circ_circulation_selectborrower" class="brief"> > <legend>Patron selection</legend> > >+[% IF (forceallow) %]<input type="hidden" name="forceallow" value="1">[% END %] > <input type="hidden" name="branch" value="[% branch %]" /> > <input type="hidden" name="printer" value="[% printer %]" /> > <input type="hidden" name="duedatespec" value="[% duedatespec %]" /> >@@ -478,6 +492,8 @@ No patron matched <span class="ex">[% message %]</span> > <span id="clearscreen"><a href="/cgi-bin/koha/circ/circulation.pl" title="Clear screen">x</a></span> > [% END %] > >+ [% IF (forceallow) %]<input type="hidden" name="forceallow" value="1">[% END %] >+ > <label for="barcode">Checking out to [% INCLUDE 'patron-title.inc' %]</label> > > <div class="hint">Enter item barcode:</div> >@@ -526,6 +542,8 @@ No patron matched <span class="ex">[% message %]</span> > <h3>[% IF ( noissues ) %] > Cannot check out! > [% ELSE %]Attention:[% END %]</h3> >+ >+ > <ul> > > [% IF ( warndeparture ) %] >@@ -594,6 +612,13 @@ No patron matched <span class="ex">[% message %]</span> > > > </ul> >+ >+[% IF (noissues && borrowernumber) %] >+<div class="override_debarment"> >+<a href="/cgi-bin/koha/circ/circulation.pl?forceallow=1&borrowernumber=[% borrowernumber %]" class="btn btn-small">Override debarment temporarily</a> >+</div> >+[% END %] >+ > </div> > > [% IF ( WaitingReserveLoop ) %] >-- >1.7.10.4
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 643
:
9010
|
28453
|
28753
|
30715
|
30716
|
30726
|
30727
|
31564
|
31837
|
31997
|
31998
|
31999
|
32120
|
32121
|
32122
|
32925
|
32946