From 5c42809746e4b256766174d4d374f73d02616111 Mon Sep 17 00:00:00 2001 From: Bernardo Gonzalez Kriegel Date: Thu, 31 Jul 2014 16:47:30 -0300 Subject: [PATCH] Bug 12687 - Remove CGI::scrolling_list from circulation.pl This patch removes the only instance in this file To test: 1. Apply the patch 2. Search for patrons on staff CheckOut, use a string that gives multiple results 3. Results are displayed on a select, that was replaced. 4. Check for regressions: select a patron and press 'Select', or do double click on a patron name, verify you go to patron's checkout tab. Signed-off-by: Owen Leonard Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- circ/circulation.pl | 19 ++++++------------- .../prog/en/modules/circ/circulation.tt | 16 ++++++++++------ 2 files changed, 16 insertions(+), 19 deletions(-) diff --git a/circ/circulation.pl b/circ/circulation.pl index b95bffa29a..c766e88541 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -371,7 +371,7 @@ if ($borrowernumber) { my @values; my %labels; -my $CGIselectborrower; +my $selectborrower; if ($borrowerslist) { foreach ( sort {(lc $a->{'surname'} cmp lc $b->{'surname'} || lc $a->{'firstname'} cmp lc $b->{'firstname'}) @@ -382,17 +382,10 @@ if ($borrowerslist) { $labels{ $_->{'borrowernumber'} } = "$_->{'surname'}, $_->{'firstname'} ... ($_->{'cardnumber'} - $_->{'categorycode'} - $_->{'branchcode'}) ... $_->{'address'} "; } - $CGIselectborrower = CGI::scrolling_list( - -name => 'borrowernumber', - -class => 'focus', - -id => 'borrowernumber', - -values => \@values, - -labels => \%labels, - -ondblclick => 'document.forms[\'mainform\'].submit()', - -size => 7, - -tabindex => '', - -multiple => 0 - ); + $selectborrower = { + values => \@values, + labels => \%labels, + }; } #title @@ -544,7 +537,7 @@ $template->param( stickyduedate => $stickyduedate, duedatespec => $duedatespec, message => $message, - CGIselectborrower => $CGIselectborrower, + selectborrower => $selectborrower, totaldue => sprintf('%.2f', $total), inprocess => $inprocess, is_child => ($borrowernumber && $borrower->{'category_type'} eq 'C'), 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 d573ba4b01..fd65b02d82 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -41,7 +41,7 @@ var relatives_borrowernumbers = new Array(); var MSG_ADD_MESSAGE = _("Add a new message"); var MSG_EXPORT_SELECT_CHECKOUTS = _("You must select checkout(s) to export"); [% IF ( borrowernumber ) %]if($.cookie("holdfor") != [% borrowernumber %]){ $.cookie("holdfor",null, { path: "/", expires: 0 }); }[% ELSE %]$.cookie("holdfor",null, { path: "/", expires: 0 });[% END %] -[% UNLESS ( borrowernumber ) %][% UNLESS ( CGIselectborrower ) %]window.onload=function(){ $('#findborrower').focus(); };[% END %][% END %] +[% UNLESS ( borrowernumber ) %][% UNLESS ( selectborrower ) %]window.onload=function(){ $('#findborrower').focus(); };[% END %][% END %] $(document).ready(function() { [% IF !( CircAutoPrintQuickSlip == 'clear' ) %] @@ -68,7 +68,7 @@ $(document).ready(function() { Checkouts [% END %] -[% IF ( CGIselectborrower ) %] +[% IF ( selectborrower ) %]
@@ -433,7 +433,7 @@ No patron matched [% message %] [% END %] -[% IF ( CGIselectborrower ) %] +[% IF ( selectborrower ) %] [% INCLUDE 'patron-toolbar.inc' %]
@@ -447,13 +447,17 @@ No patron matched [% message %]
  1. - [% CGIselectborrower %] +

-[% ELSE %] +[% ELSE %] @@ -800,7 +804,7 @@ No patron matched [% message %]
-[% UNLESS ( CGIselectborrower ) %][% IF ( borrowernumber ) %]
+[% UNLESS ( selectborrower ) %][% IF ( borrowernumber ) %]
[% INCLUDE 'circ-menu.inc' %]
[% END %][% END %]
-- 2.39.5