From 513990edd19f262ad8ac4741aab13ecf5cbdf151 Mon Sep 17 00:00:00 2001 From: Chris Cormack Date: Tue, 22 Jan 2008 16:31:17 -0600 Subject: [PATCH] Fix for bug 1560 Signed-off-by: Joshua Ferraro --- cataloguing/addbiblio.pl | 41 ++++++++----------- .../en/modules/cataloguing/addbiblio.tmpl | 11 ++++- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl index fc25bc71e7..532217ecd8 100755 --- a/cataloguing/addbiblio.pl +++ b/cataloguing/addbiblio.pl @@ -742,31 +742,22 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( } ); -#Getting the list of all frameworks -my $queryfwk = $dbh->prepare("select frameworktext, frameworkcode from biblio_framework"); -$queryfwk->execute; -my %select_fwk; -my @select_fwk; -my $curfwk; -push @select_fwk, "Default"; -$select_fwk{"Default"} = "Default"; - -while ( my ( $description, $fwk ) = $queryfwk->fetchrow ) { - push @select_fwk, $fwk; - $select_fwk{$fwk} = $description; -} -$curfwk = $frameworkcode; -my $framework = CGI::scrolling_list( - -name => 'Frameworks', - -id => 'Frameworks', - -default => $curfwk, - -onchange => 'Changefwk(this);', - -values => \@select_fwk, - -labels => \%select_fwk, - -size => 1, - -multiple => 0 -); -$template->param( framework => $framework, breedingid => $breedingid ); +# Getting the list of all frameworks +# get framework list +my $frameworks = getframeworks; +my @frameworkcodeloop; +foreach my $thisframeworkcode ( keys %$frameworks ) { + my %row = ( + value => $thisframeworkcode, + frameworktext => $frameworks->{$thisframeworkcode}->{'frameworktext'}, + ); + if ($frameworkcode eq $thisframeworkcode){ + $row{'selected'}="selected"; + } + push @frameworkcodeloop, \%row; +} +$template->param( frameworkcodeloop => \@frameworkcodeloop, + breedingid => $breedingid ); # ++ Global $tagslib = &GetMarcStructure( 1, $frameworkcode ); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tmpl index 3be7e525f9..8ffe84e501 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tmpl @@ -498,7 +498,16 @@ function unHideSubfield(index,labelindex) { // FIXME :: is it used ? -- 2.39.5