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:
parent
bd53a70d31
commit
262c959992
1 changed files with 4 additions and 4 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue