Changing table row color toggle so that color values can be specified in the template instead of the script (requires update to template)

This commit is contained in:
oleonard 2005-01-20 20:20:57 +00:00
parent bd53a70d31
commit 262c959992

View file

@ -162,7 +162,7 @@ if ($op eq 'add_form') {
my $env;
my @loop;
my ($count,$results)=StringSearch($env,$searchfield,'web');
my $toggle = 'white';
my $toggle = 0;
for (my $i=0; $i < $count; $i++){
my %row = (categorycode => $results->[$i]{'categorycode'},
description => $results->[$i]{'description'},
@ -175,13 +175,13 @@ if ($op eq 'add_form') {
reservefee => $results->[$i]{'reservefee'},
toggle => $toggle );
push @loop, \%row;
if ( $toggle eq 'white' )
if ( $toggle eq 0 )
{
$toggle = '#ffffcc';
$toggle = 1;
}
else
{
$toggle = 'white';
$toggle = 0;
}
}
$template->param(loop => \@loop);