avoid adding extra disabled fields for arrays

master
Joey Hess 2008-08-03 14:41:53 -04:00
parent d00f3edf13
commit 5c0f539950
1 changed files with 6 additions and 5 deletions

View File

@ -110,14 +110,15 @@ sub showfields ($$$@) { #{{{
}
}
my $value=$config{$key};
if (ref $config{$key} eq 'ARRAY' || ref $info{example} eq 'ARRAY') {
push @{$value}, "", ""; # blank items for expansion
}
# multiple plugins can have the same field
my $name=defined $plugin ? $plugin.".".$key : $key;
my $value=$config{$key};
if ($info{safe} && (ref $config{$key} eq 'ARRAY' || ref $info{example} eq 'ARRAY')) {
push @{$value}, "", ""; # blank items for expansion
}
if ($info{type} eq "string") {
$form->field(
name => $name,