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++;
}
}
qq|<input type=hidden name=current_page value=1 >|,
checkbox( -name => 'debug', -default => 0 ), # FIXME hidden?
qq|<div id=inputs>|,
- h2( 'Select input' ),
+ $inputs_available > 1 ?
+ h2( 'Select input' ) .
checkbox_group(
-name => 'only_input',
%$only_input,
-linebreak=> 'true',
- ),
+ ) : '',
qq|</div>|,
end_form,
;