From 8f902d3248b992539a75e3bbaf77058f166be37d Mon Sep 17 00:00:00 2001 From: Chris Cormack Date: Mon, 15 Feb 2010 09:23:46 +1300 Subject: [PATCH] Bug 1542, followup patch to tidy up some messy dropdown behaviour Signed-off-by: Galen Charlton --- C4/Reports/Guided.pm | 2 ++ .../intranet-tmpl/prog/en/modules/reports/dictionary.tmpl | 8 ++++++-- reports/dictionary.pl | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/C4/Reports/Guided.pm b/C4/Reports/Guided.pm index d8277b7e31..3cdd5b46fe 100644 --- a/C4/Reports/Guided.pm +++ b/C4/Reports/Guided.pm @@ -152,6 +152,7 @@ This will return a list of all the available report areas =cut sub get_report_areas { + my $area = shift; my $dbh = C4::Context->dbh(); # FIXME these should be in the database @@ -161,6 +162,7 @@ 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/koha-tmpl/intranet-tmpl/prog/en/modules/reports/dictionary.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/dictionary.tmpl index 3c0d86305e..f6d23174a6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/dictionary.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/dictionary.tmpl @@ -28,8 +28,12 @@ Filter by area diff --git a/reports/dictionary.pl b/reports/dictionary.pl index 5bbc473803..3fd4e520e5 100755 --- a/reports/dictionary.pl +++ b/reports/dictionary.pl @@ -55,7 +55,7 @@ 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(); + my $areas = get_report_areas($area); my $definitions = get_from_dictionary($area); $template->param( 'areas' => $areas , 'start_dictionary' => 1, -- 2.20.1