bug 3485: Clear Borrower record after checkout.
authorPTFS Contractor <dbavousett@ptfs.com>
Sun, 26 Jul 2009 18:56:01 +0000 (19:56 +0100)
committerGalen Charlton <gmcharlt@gmail.com>
Sun, 23 Aug 2009 17:21:21 +0000 (13:21 -0400)
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 <colin.campbell@ptfs-europe.com>
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
admin/systempreferences.pl
circ/circulation.pl
installer/data/mysql/en/mandatory/sysprefs.sql
installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql
installer/data/mysql/updatedatabase.pl
koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl

index ded82ae..a562293 100755 (executable)
@@ -169,6 +169,7 @@ $tabsysprefs{OPACFineNoRenewals}             = "Circulation";
 $tabsysprefs{InProcessingToShelvingCart}     = "Circulation";
 $tabsysprefs{NewItemsDefaultLocation}        = "Circulation";
 $tabsysprefs{ReturnToShelvingCart}           = "Circulation";
+$tabsysprefs{DisplayClearScreenButton}       = "Circulation";
 
 # Staff Client
 $tabsysprefs{TemplateEncoding}        = "StaffClient";
index 986b10c..8dfdff0 100755 (executable)
@@ -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
 
index 31b74d9..64fcf15 100644 (file)
@@ -254,3 +254,4 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES
 INSERT INTO `systempreferences` ( `variable` , `value` , `options` , `explanation` , `type` ) VALUES ( 'NewItemsDefaultLocation', '', '', 'If set, all new items will have a location of the given Location Code ( Authorized Value type LOC )', '');
 INSERT INTO `systempreferences` ( `variable` , `value` , `options` , `explanation` , `type` ) VALUES ( 'InProcessingToShelvingCart', '0', '', 'If set, when any item with a location code of PROC is ''checked in'', it''s location code will be changed to CART.', 'YesNo');
 INSERT INTO `systempreferences` ( `variable` , `value` , `options` , `explanation` , `type` ) VALUES ( 'ReturnToShelvingCart', '0', '', 'If set, when any item is ''checked in'', it''s location code will be changed to CART.', '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');
index 5c1c42c..ed50a41 100644 (file)
@@ -256,3 +256,4 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES
 INSERT INTO `systempreferences` ( `variable` , `value` , `options` , `explanation` , `type` ) VALUES ( 'NewItemsDefaultLocation', '', '', 'Ce qui permit tous les nouveaux exemplaires reçus à l\'emplacement de la valeur donnée', '');
 INSERT INTO `systempreferences` ( `variable` , `value` , `options` , `explanation` , `type` ) VALUES ( 'InProcessingToShelvingCart', '0', '', 'Si défini, quand un exemplaire avec localisation de PROC est renvoyé son code sera modifié pour CART.', 'YesNo');
 INSERT INTO `systempreferences` ( `variable` , `value` , `options` , `explanation` , `type` ) VALUES ( 'ReturnToShelvingCart', '0', '', 'Si défini, quand un exemplaire  est renvoyé son code sera modifié pour CART.' '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');
index f28624f..9377592 100755 (executable)
@@ -2521,6 +2521,13 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
     print "Upgrade to $DBversion done (amended Item added NewItemsDefaultLocation, InProcessingToShelvingCart, ReturnToShelvingCart sysprefs)\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
index e261b9f..013a303 100644 (file)
@@ -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>