Fix bug where default propeties were not applied correctly to mailings generated by managers.

This commit is contained in:
Martin Kamerbeek 2010-07-09 10:30:59 +02:00
parent 253450928b
commit 65c04acc7c

View file

@ -590,15 +590,15 @@ sub www_editSave {
my %fields = %{ $self->getAsset->getMailingProperties( $self ) }; my %fields = %{ $self->getAsset->getMailingProperties( $self ) };
my $configuration = {}; my $configuration = {};
if ( $self->admin->canOverride ) { while ( my( $name, $properties ) = each %fields ) {
while ( my( $name, $properties ) = each %fields ) { if ( $self->admin->canOverride ) {
my $value = $form->process( $name, $properties->{ fieldType }, $properties->{ defaultValue } ); my $value = $form->process( $name, $properties->{ fieldType }, $properties->{ defaultValue } );
$configuration->{ $name } = $value; $configuration->{ $name } = $value;
} }
} else {
else { $configuration->{ $name } = $properties->{ defaultValue } || $properties->{ value };
$configuration = \%fields; }
} }
#### TODO: Add error checking and required fields? #### TODO: Add error checking and required fields?