From c769585ceb841adf9f328f195c686ca63ca99c3d Mon Sep 17 00:00:00 2001 From: JaTara Barnes Date: Wed, 8 Jan 2014 22:31:06 -0600 Subject: [PATCH] [SIGNED OFF] Bug 11415: Add syspref to toggle SCO receipt printing Updated files to set default to 1 in sysprefs.sql. Also added code to read the system preference on the template page. Signed-off-by: Mark Tompsett --- installer/data/mysql/sysprefs.sql | 2 +- .../opac-tmpl/bootstrap/en/modules/sco/sco-main.tt | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index 30733bf..556bd72 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -332,7 +332,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('SearchEngine','Zebra','Solr|Zebra','Search Engine','Choice'), ('SearchMyLibraryFirst','0',NULL,'If ON, OPAC searches return results limited by the user\'s library by default if they are logged in','YesNo'), ('SelfCheckHelpMessage','','70|10','Enter HTML to include under the basic Web-based Self Checkout instructions on the Help page','Textarea'), -('SelfCheckReceiptPrompt','0','NULL','If ON, print receipt dialog pops up when self checkout is finished','YesNo'), +('SelfCheckReceiptPrompt','1','NULL','If ON, print receipt dialog pops up when self checkout is finished','YesNo'), ('SelfCheckTimeout','120','','Define the number of seconds before the Web-based Self Checkout times out a patron','Integer'), ('SeparateHoldings','0',NULL,'Separate current branch holdings from other holdings','YesNo'), ('SeparateHoldingsBranch','homebranch','homebranch|holdingbranch','Branch used to separate holdings','Choice'), diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt index dc09720..ad5790d 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt @@ -1,3 +1,4 @@ +[% USE Koha %] [% USE KohaDates %] [% INCLUDE 'doc-head-open.inc' %][% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha [% END %] › Self checkout @@ -356,7 +357,7 @@ $("#logout_form").submit(function(){ clearTimeout(mainTimeout); - [% IF ( SelfCheckReceiptPrompt ) %] + [% IF Koha.Preference('SelfCheckReceiptPrompt') %] if(confirm("Would you like to print a receipt?")){ window.open("/cgi-bin/koha/sco/printslip.pl?borrowernumber=[% borrowernumber %]&print=qslip"); [% END %] -- 1.7.9.5