From: PTFS Contractor <[email protected]>

Button added to clear the last Borrower record after transaction is complete
To enable, turn on the syspref DisplayClearScreenButton.

This work was sponsored by Middletown Township Public Library, Middletown, NJ 
USA

Signed-off-by: Colin Campbell <[email protected]>
---
 admin/systempreferences.pl                         |    1 +
 circ/circulation.pl                                |    4 ++++
 installer/data/mysql/en/mandatory/sysprefs.sql     |    1 +
 .../1-Obligatoire/unimarc_standard_systemprefs.sql |    1 +
 installer/data/mysql/updatedatabase.pl             |    7 +++++++
 .../prog/en/modules/circ/circulation.tmpl          |    4 ++++
 6 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/admin/systempreferences.pl b/admin/systempreferences.pl
index 4a84b13..7df3840 100755
--- a/admin/systempreferences.pl
+++ b/admin/systempreferences.pl
@@ -162,6 +162,7 @@ $tabsysprefs{BranchTransferLimitsType}       = 
"Circulation";
 $tabsysprefs{AllowNotForLoanOverride}        = "Circulation";
 $tabsysprefs{RenewalPeriodBase}              = "Circulation";
 $tabsysprefs{FilterBeforeOverdueReport}      = "Circulation";
+$tabsysprefs{DisplayClearScreenButton}       = "Circulation";
 
 # Staff Client
 $tabsysprefs{TemplateEncoding}        = "StaffClient";
diff --git a/circ/circulation.pl b/circ/circulation.pl
index 986b10c..8dfdff0 100755
--- a/circ/circulation.pl
+++ b/circ/circulation.pl
@@ -106,6 +106,10 @@ if (C4::Context->preference("AutoLocation") ne 1) { # 
FIXME: string comparison t
     $template->param(ManualLocation => 1);
 }
 
+if (C4::Context->preference("DisplayClearScreenButton")) {
+    $template->param(DisplayClearScreenButton => 1);
+}
+
 my $barcode        = $query->param('barcode') || '';
 $barcode =~  s/^\s*|\s*$//g; # remove leading/trailing whitespace
 
diff --git a/installer/data/mysql/en/mandatory/sysprefs.sql 
b/installer/data/mysql/en/mandatory/sysprefs.sql
index a978fad..9dd900a 100644
--- a/installer/data/mysql/en/mandatory/sysprefs.sql
+++ b/installer/data/mysql/en/mandatory/sysprefs.sql
@@ -245,3 +245,4 @@ INSERT INTO systempreferences 
(variable,value,explanation,options,type)VALUES('v
 INSERT INTO systempreferences 
(variable,value,explanation,options,type)VALUES('viewLabeledMARC','0','Allow 
display of labeled MARC view of bibiographic records','','YesNo');
 INSERT INTO systempreferences 
(variable,value,explanation,options,type)VALUES('viewMARC','1','Allow display 
of MARC view of bibiographic records','','YesNo');
 INSERT INTO systempreferences 
(variable,value,explanation,options,type)VALUES('FilterBeforeOverdueReport','0','Do
 not run overdue report until filter selected','','YesNo');
+INSERT INTO `systempreferences` ( `variable` , `value` , `options` , 
`explanation` , `type` ) VALUES ( 'DisplayClearScreenButton', '0', '', 'If set 
to yes, a clear screen button will appear on the circulation page.', 'YesNo');
diff --git 
a/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql 
b/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql
index 424b716..87e6706 100644
--- a/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql
+++ b/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql
@@ -247,3 +247,4 @@ INSERT INTO systempreferences 
(variable,value,explanation,options,type)VALUES('v
 INSERT INTO systempreferences 
(variable,value,explanation,options,type)VALUES('viewLabeledMARC','0','Autoriser
 l''affichage MARC labellis des notices bibliographiques','','YesNo');
 INSERT INTO systempreferences 
(variable,value,explanation,options,type)VALUES('viewMARC','1','Autoriser 
l''affichage de la vue MARC des notices bibliographiques','','YesNo');
 INSERT INTO systempreferences 
(variable,value,explanation,options,type)VALUES('FilterBeforeOverdueReport','0','Ne
 pas lancer le rapport sur les retards tant qu''il n''y a pas de 
filtre','','YesNo');
+INSERT INTO `systempreferences` ( `variable` , `value` , `options` , 
`explanation` , `type` ) VALUES ('DisplayClearScreenButton', '0', '', 'Cette 
option ajoute un bouton à la page de circulation pour effacer l\'écran', 
'YesNo');
diff --git a/installer/data/mysql/updatedatabase.pl 
b/installer/data/mysql/updatedatabase.pl
index 58497c8..1772a40 100755
--- a/installer/data/mysql/updatedatabase.pl
+++ b/installer/data/mysql/updatedatabase.pl
@@ -2467,6 +2467,13 @@ if (C4::Context->preference("Version") < 
TransformToNum($DBversion)) {
     print "Upgrade to $DBversion done (added FilterBeforeOverdueReport syspref 
and new index on authorised_values)\n";
 }
 
+$DBversion = '3.01.00.044';
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+    $dbh->do("INSERT INTO systempreferences 
(variable,value,explanation,options,type)VALUES( 'DisplayClearScreenButton', 
'0', '', 'If set to yes, a clear screen button will appear on the circulation 
page.', 'YesNo')");
+    SetVersion ($DBversion);
+    print "Upgrade to $DBversion done (added FilterBeforeOverdueReport syspref 
and new index on authorised_values)\n";
+}
+
 =item DropAllForeignKeys($table)
 
   Drop all foreign keys of the table $table
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl 
b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl
index 050c72c..796fa42 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl
@@ -261,6 +261,10 @@ No patron matched <span class="ex"><!-- TMPL_VAR 
name="message" --></span>
 <!-- TMPL_ELSE -->
 <div><!-- /TMPL_IF --><form method="post" 
action="/cgi-bin/koha/circ/circulation.pl" name="mainform">
 <fieldset id="circ_circulation_issue">
+    <!-- TMPL_IF NAME="DisplayClearScreenButton" -->
+           <input type=button value="Clear Screen" onClick="window.location = 
'/cgi-bin/koha/circ/circulation.pl'">
+    <!-- /TMPL_IF -->
+
     <label for="barcode">Checking out to <!-- TMPL_VAR name="firstname" --> 
<!-- TMPL_VAR name="surname" --> (<!-- TMPL_VAR NAME="cardnumber" -->) </label>
        <div class="hint">Enter item barcode:</div>
 
-- 
1.6.2.5

_______________________________________________
Koha-patches mailing list
[email protected]
http://lists.koha.org/mailman/listinfo/koha-patches

Reply via email to