From 36ec435cd900ab80ec41fa85923c2671899de6c3 Mon Sep 17 00:00:00 2001 From: PTFS Contractor Date: Sun, 26 Jul 2009 19:56:01 +0100 Subject: [PATCH] bug 3485: Clear Borrower record after checkout. 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 Signed-off-by: Galen Charlton --- admin/systempreferences.pl | 1 + circ/circulation.pl | 4 ++++ installer/data/mysql/en/mandatory/sysprefs.sql | 1 + .../fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql | 1 + installer/data/mysql/updatedatabase.pl | 7 +++++++ .../intranet-tmpl/prog/en/modules/circ/circulation.tmpl | 4 ++++ 6 files changed, 18 insertions(+) diff --git a/admin/systempreferences.pl b/admin/systempreferences.pl index ded82ae141..a56229300d 100755 --- a/admin/systempreferences.pl +++ b/admin/systempreferences.pl @@ -169,6 +169,7 @@ $tabsysprefs{OPACFineNoRenewals} = "Circulation"; $tabsysprefs{InProcessingToShelvingCart} = "Circulation"; $tabsysprefs{NewItemsDefaultLocation} = "Circulation"; $tabsysprefs{ReturnToShelvingCart} = "Circulation"; +$tabsysprefs{DisplayClearScreenButton} = "Circulation"; # Staff Client $tabsysprefs{TemplateEncoding} = "StaffClient"; diff --git a/circ/circulation.pl b/circ/circulation.pl index 986b10cf20..8dfdff0d77 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 31b74d96e5..64fcf159d5 100644 --- a/installer/data/mysql/en/mandatory/sysprefs.sql +++ b/installer/data/mysql/en/mandatory/sysprefs.sql @@ -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'); 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 5c1c42cef7..ed50a41287 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 @@ -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'); diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index f28624f706..9377592ae3 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -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 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 e261b9f6af..013a30373d 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
+ + + +
Enter item barcode:
-- 2.39.5