From f1500dd3699dbfac72c7418d6c24701681ddd488 Mon Sep 17 00:00:00 2001 From: oleonard Date: Fri, 11 Feb 2005 16:24:11 +0000 Subject: [PATCH] Updating table row color toggle to pass variable to the template instead of HTML value. Works now with CSS. --- admin/systempreferences.pl | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/admin/systempreferences.pl b/admin/systempreferences.pl index 0aa0ba5701..b314821440 100755 --- a/admin/systempreferences.pl +++ b/admin/systempreferences.pl @@ -283,18 +283,19 @@ if ($op eq 'add_form') { } my $env; my ($count,$results)=StringSearch($env,$searchfield,'web'); - my $toggle="white"; + my $toggle=0; my @loop_data = (); for (my $i=$offset; $i < ($offset+$pagesize<$count?$offset+$pagesize:$count); $i++){ - if ($toggle eq 'white'){ - $toggle="#ffffcc"; + if ($toggle eq 0){ + $toggle=1; } else { - $toggle="white"; + $toggle=0; } my %row_data; # get a fresh hash for the row data $row_data{variable} = $results->[$i]{'variable'}; $row_data{value} = $results->[$i]{'value'}; $row_data{explanation} = $results->[$i]{'explanation'}; + $row_data{toggle} = $toggle; $row_data{edit} = "$script_name?op=add_form&searchfield=".$results->[$i]{'variable'}; $row_data{delete} = "$script_name?op=delete_confirm&searchfield=".$results->[$i]{'variable'}; push(@loop_data, \%row_data); -- 2.39.5