From 368681f9dd9ed7e66deb9e3b12c80581c5c15e54 Mon Sep 17 00:00:00 2001 From: Garry Collum Date: Tue, 9 Jun 2009 18:34:55 -0400 Subject: [PATCH] Bug 2889: Removed toggle variable from categorie.pl and categorie.tmpl. Removed toggle variable from categorie.pl and categorie.tmpl. Used template __odd__variable in categorie.tmpl. Signed-off-by: Galen Charlton --- admin/categorie.pl | 12 +----------- .../prog/en/modules/admin/categorie.tmpl | 6 +++++- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/admin/categorie.pl b/admin/categorie.pl index bc5f725b60..57e30d9be3 100755 --- a/admin/categorie.pl +++ b/admin/categorie.pl @@ -182,7 +182,6 @@ if ($op eq 'add_form') { $template->param(else => 1); my @loop; my ($count,$results)=StringSearch($searchfield,'web'); - my $toggle = 0; for (my $i=0; $i < $count; $i++){ my %row = (categorycode => $results->[$i]{'categorycode'}, description => $results->[$i]{'description'}, @@ -194,21 +193,12 @@ if ($op eq 'add_form') { issuelimit => $results->[$i]{'issuelimit'}, reservefee => sprintf("%.2f",$results->[$i]{'reservefee'}), category_type => $results->[$i]{'category_type'}, - "type_".$results->[$i]{'category_type'} => 1, - toggle => $toggle ); + "type_".$results->[$i]{'category_type'} => 1); if (C4::Context->preference('EnhancedMessagingPreferences')) { my $brief_prefs = _get_brief_messaging_prefs($results->[$i]{'categorycode'}); $row{messaging_prefs} = $brief_prefs if @$brief_prefs; } push @loop, \%row; - if ( $toggle eq 0 ) - { - $toggle = 1; - } - else - { - $toggle = 0; - } } $template->param(loop => \@loop); # check that I (institution) and C (child) exists. otherwise => warning to the user diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tmpl index 167a7f1d28..e46b381f3b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tmpl @@ -233,7 +233,11 @@ Confirm Deletion of Category   - + + + + + ?op=add_form&categorycode="> -- 2.39.5