From 6b12c14cc10503d6b0783e8ef71fe44d9a9b37b6 Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 19 Jun 2006 08:05:28 +0000 Subject: add ability to select specific package defs. and package status to package report for qis --- httemplate/config/config.cgi | 72 ++++++++++++++++++++++++++++++++++++-------- 1 file changed, 59 insertions(+), 13 deletions(-) (limited to 'httemplate/config') diff --git a/httemplate/config/config.cgi b/httemplate/config/config.cgi index 21f79a9dc..6008c0e42 100644 --- a/httemplate/config/config.cgi +++ b/httemplate/config/config.cgi @@ -55,25 +55,65 @@ function SafeOnsubmit() { #warn $i->key unless defined($type); %> <% if ( $type eq '' ) { %> - no type + + no type + <% } elsif ( $type eq 'textarea' ) { %> - + + + <% } elsif ( $type eq 'checkbox' ) { %> - exists($i->key) ? ' CHECKED' : '' %>> + + exists($i->key) ? ' CHECKED' : '' %>> + <% } elsif ( $type eq 'text' ) { %> - + + + <% } elsif ( $type eq 'select' || $type eq 'selectmultiple' ) { %> - > + <% + my %hash = (); + if ( $i->select_enum ) { + tie %hash, 'Tie::IxHash', + '' => '', map { $_ => $_ } @{ $i->select_enum }; + } elsif ( $i->select_hash ) { + if ( ref($i->select_hash) eq 'ARRAY' ) { + tie %hash, 'Tie::IxHash', + '' => '', @{ $i->select_hash }; + } else { + tie %hash, 'Tie::IxHash', + '' => '', %{ $i->select_hash }; + } + } else { + %hash = ( '' => 'WARNING: neither select_enum nor select_hash specified in Conf.pm for configuration option "'. $i->key. '"' ); + } + + my %saw = (); + foreach my $value ( keys %hash ) { + local($^W)=0; next if $saw{$value}++; + my $label = $hash{$value}; + %> + +