avoid adding extra disabled fields for arrays
parent
d00f3edf13
commit
5c0f539950
|
@ -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
|
# multiple plugins can have the same field
|
||||||
my $name=defined $plugin ? $plugin.".".$key : $key;
|
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") {
|
if ($info{type} eq "string") {
|
||||||
$form->field(
|
$form->field(
|
||||||
name => $name,
|
name => $name,
|
||||||
|
|
Loading…
Reference in New Issue