- All assets now have an autoGenerateForms property just like wobjects per the
rough edges discussions in Community IRC.
This commit is contained in:
parent
4a4da7bb43
commit
2f3ae0faef
4 changed files with 91 additions and 144 deletions
|
|
@ -210,38 +210,6 @@ sub getCollateral {
|
|||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 getEditForm ()
|
||||
|
||||
Returns the TabForm object that will be used in generating the edit page for this wobject.
|
||||
|
||||
=cut
|
||||
|
||||
sub getEditForm {
|
||||
my $self = shift;
|
||||
my $tabform = $self->SUPER::getEditForm();
|
||||
foreach my $definition (reverse @{$self->definition($self->session)}) {
|
||||
my $properties = $definition->{properties};
|
||||
next unless ($definition->{autoGenerateForms});
|
||||
foreach my $fieldname (keys %{$properties}) {
|
||||
my %params;
|
||||
foreach my $key (keys %{$properties->{$fieldname}}) {
|
||||
next if ($key eq "tab");
|
||||
$params{$key} = $properties->{$fieldname}{$key};
|
||||
}
|
||||
$params{value} = $self->getValue($fieldname);
|
||||
$params{name} = $fieldname;
|
||||
my $tab = $properties->{$fieldname}{tab} || "properties";
|
||||
$tabform->getTab($tab)->dynamicField(%params);
|
||||
}
|
||||
}
|
||||
return $tabform;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 moveCollateralDown ( tableName, keyName, keyValue [ , setName, setValue ] )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue