Bugzilla – Attachment 9446 Details for
Bug 8058
Circulation empty barcode field redirect to pay fines screen if borrower has outstanding fines
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Circulation empty barcode field redirect to pay fines screen if borrower has outstanding fine
0001-bug8058-Circulation-empty-barcode-field-redirect-to-.patch (text/plain), 4.99 KB, created by
Chris Hall
on 2012-05-07 23:06:07 UTC
(
hide
)
Description:
Circulation empty barcode field redirect to pay fines screen if borrower has outstanding fine
Filename:
MIME Type:
Creator:
Chris Hall
Created:
2012-05-07 23:06:07 UTC
Size:
4.99 KB
patch
obsolete
>From 7dd434ff3fc90c3e68b68f6e4ca58641b314cbcc Mon Sep 17 00:00:00 2001 >From: Chris Hall <chrish@catalyst.net.nz> >Date: Sun, 6 May 2012 11:50:43 +1200 >Subject: [PATCH] bug8058 Circulation empty barcode field redirect to pay fines screen if borrower has outstanding fines > >--- > circ/circulation.pl | 1 + > installer/data/mysql/sysprefs.sql | 1 + > installer/data/mysql/updatedatabase.pl | 7 +++++++ > .../en/modules/admin/preferences/circulation.pref | 7 +++++++ > .../prog/en/modules/circ/circulation.tt | 17 +++++++++++++++-- > 5 files changed, 31 insertions(+), 2 deletions(-) > >diff --git a/circ/circulation.pl b/circ/circulation.pl >index bcbcb6f..e8d1abf 100755 >--- a/circ/circulation.pl >+++ b/circ/circulation.pl >@@ -705,6 +705,7 @@ $template->param( > fast_cataloging => $fast_cataloging, > CircAutoPrintQuickSlip => C4::Context->preference("CircAutoPrintQuickSlip"), > activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''), >+ CircPayFinesRedirect => (C4::Context->preference('CircPayFinesRedirect') ? $total : 0), > ); > > # save stickyduedate to session >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index 49debd2..b9cce3f 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -362,3 +362,4 @@ INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES(' > INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('AutoResumeSuspendedHolds', '1', NULL , 'Allow suspended holds to be automatically resumed by a set date.', 'YesNo'); > INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OpacStarRatings','all',NULL,'disable|all|details','Choice'); > INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacBrowseResults','1','Disable/enable browsing and paging search results from the OPAC detail page.',NULL,'YesNo'); >+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('CircPayFindsRedirect','0','When an empty barcode is entered into the checkout field will redirect to pay fines page if borrowser has fines to pay (after quickslip if enabled)',NULL,'YesNo'); >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index 84f0437..4a74b6d 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -5212,6 +5212,13 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { > SetVersion($DBversion); > } > >+$DBversion = "3.08.00.XXX"; >+if( C4::Context->preference("Version") < TransformToNum($DBversion) ){ >+ $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('CircPayFindsRedirect','0','When an empty barcode is entered into the checkout field will redirect to pay fines page if borrowser has fines to pay (after quickslip if enabled)',NULL,'YesNo')"); >+ print "Upgrade to $Dbversion done\n"; >+ SetVersion($DBversion); >+} >+ > =head1 FUNCTIONS > > =head2 TableExists($table) >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref >index 471aa0e..52b37fc 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref >@@ -99,6 +99,13 @@ Circulation: > no: "clear the screen" > - . > - >+ - When an empty barcode field is submitted in circulation (and after any quick slip printing, if enabled) >+ - pref: CircPayFinesRedirect >+ choices: >+ yes: "redirect to pay fines screen if borrower has fines to pay" >+ no: "do nothing" >+ - . >+ - > - Include the stylesheet at > - pref: NoticeCSS > class: url >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 e79cef1..8bed112 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >@@ -50,8 +50,21 @@ > // listen submit to trigger qslip on empty checkout > $('#mainform').bind('submit',function() { > if ($('#barcode').val() == '') { >- return printx_window('qslip'); } >- });[% END %] >+ var code = printx_window('qslip'); >+ [% IF (CircPayFinesRedirect) %] >+ window.location = "/cgi-bin/koha/members/pay.pl?borrowernumber=[% borrowernumber %];"; >+ [% END %] >+ return code; >+ } >+ }); >+ [% ELSIF ( CircPayFinesRedirect ) %] >+ $('#mainform').bind('submit', function(){ >+ if ($('#barcode').val() == '') { >+ window.location = "/cgi-bin/koha/members/pay.pl?borrowernumber=[% borrowernumber %]"; >+ return false; >+ } >+ }); >+ [% END %] > > > var allcheckboxes = $(".checkboxed"); >-- >1.7.4.1 >
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 8058
:
9445
|
9446
|
9574
|
10528
|
10531
|
12567
|
12670
|
12692
|
12693
|
15649