Fix for bug 1560

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This commit is contained in:
Chris Cormack 2008-01-22 16:31:17 -06:00 committed by Joshua Ferraro
parent b5aaa74011
commit 513990edd1
2 changed files with 26 additions and 26 deletions

View File

@ -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 );

View File

@ -498,7 +498,16 @@ function unHideSubfield(index,labelindex) { // FIXME :: is it used ?
<ul class="toolbar">
<li><input id="addbiblio" type="submit" value="Save" /></li>
<li id="z3950searchc"><input type="button" id="z3950search" value="z39.50 Search" onclick="PopupZ3950(); return false;" /></li>
<li id="changeframework"><label for="Frameworks">Change framework: </label><!--TMPL_VAR Name="framework" --> <input type="hidden" name="op" value="addbiblio" /></li>
<li id="changeframework"><label for="Frameworks">Change framework: </label>
<select name="Frameworks" id="Frameworks" onchange="Changefwk(this);">
<option value="">Default</option>
<!-- TMPL_LOOP NAME="frameworkcodeloop" -->
<option value="<!-- TMPL_VAR NAME="value"-->" <!-- TMPL_VAR NAME="selected" -->>
<!-- TMPL_VAR NAME="frameworktext" -->
</option>
<!-- /TMPL_LOOP -->
</select>
<input type="hidden" name="op" value="addbiblio" /></li>
</ul>
</div>