--- trunk/vhost/webpac2.cgi 2009/06/11 18:55:53 1227 +++ trunk/vhost/webpac2.cgi 2009/06/11 18:58:28 1228 @@ -132,12 +132,14 @@ warn dump( $attr_labels, $attr_operators ); my $only_input; +my $inputs_available = 0; foreach ( @{ $db->{input} } ) { my $input = $_->{name} || die "no name in ",dump( $_ ); if ( ! $only_input->{'-labels'}->{$input} ) { push @{ $only_input->{'-values'} }, $input; $only_input->{'-labels'}->{$input} = $_->{description} || $input; + $inputs_available++; } } @@ -163,12 +165,13 @@ qq||, checkbox( -name => 'debug', -default => 0 ), # FIXME hidden? qq|
|, - h2( 'Select input' ), + $inputs_available > 1 ? + h2( 'Select input' ) . checkbox_group( -name => 'only_input', %$only_input, -linebreak=> 'true', - ), + ) : '', qq|
|, end_form, ;