[Koha-patches] [PATCH] bug 1542 followup - tweak to keep handling the UI selected value out of C4

Galen Charlton gmcharlt at gmail.com
Mon Feb 15 00:31:10 CET 2010


Signed-off-by: Galen Charlton <gmcharlt at gmail.com>
---
 C4/Reports/Guided.pm  |    1 -
 reports/dictionary.pl |    5 ++++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/C4/Reports/Guided.pm b/C4/Reports/Guided.pm
index 3cdd5b4..108d57a 100644
--- a/C4/Reports/Guided.pm
+++ b/C4/Reports/Guided.pm
@@ -162,7 +162,6 @@ sub get_report_areas {
         my %hashrep;
         $hashrep{id}   = $i + 1;
         $hashrep{name} = $reports[$i];
-        $hashrep{selected} = 1 if $hashrep{id} == $area;
         push @reports2, \%hashrep;
     }
     return ( \@reports2 );
diff --git a/reports/dictionary.pl b/reports/dictionary.pl
index 3fd4e52..4f3814e 100755
--- a/reports/dictionary.pl
+++ b/reports/dictionary.pl
@@ -55,7 +55,10 @@ my 	( $template, $borrowernumber, $cookie ) = get_template_and_user(
 
 if ($phase eq 'View Dictionary'){
 	# view the dictionary we use to set up abstract variables such as all borrowers over fifty who live in a certain town
-	my $areas = get_report_areas($area);
+	my $areas = get_report_areas();
+    foreach (@{ $areas }) {
+        $_->{selected} = 1 if $_->{id} eq $area; # mark active area
+    }
 	my $definitions = get_from_dictionary($area);
 	$template->param( 'areas' => $areas ,
 		'start_dictionary' => 1,
-- 
1.6.3.3




More information about the Koha-patches mailing list