diff options
Diffstat (limited to 'httemplate/edit/process/elements/process.html')
-rw-r--r-- | httemplate/edit/process/elements/process.html | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/httemplate/edit/process/elements/process.html b/httemplate/edit/process/elements/process.html index 6f271ee29..de0304a94 100644 --- a/httemplate/edit/process/elements/process.html +++ b/httemplate/edit/process/elements/process.html @@ -33,7 +33,8 @@ Example: 'clear_on_error' => [ 'form_field1', 'form_field2', ... ], - #pass an arrayref of hashrefs for multiple m2ms or m2names + #pass an arrayref of hashrefs for multiple m2ms or m2names + #be certain you incorporate m2m_Common if you see error: param 'process_m2m' => { 'link_table' => 'link_table_name', 'target_table' => 'target_table_name', @@ -176,6 +177,13 @@ my %hash = my $new = $class->new( \%hash ); +if ($old && exists($opt{'copy_on_empty'})) { + foreach my $field (@{$opt{'copy_on_empty'}}) { + $new->set($field, $old->get($field)) + unless scalar($cgi->param($field)); + } +} + if ( $opt{'agent_virt'} ) { die "illegal agentnum" unless $curuser->agentnums_href->{$new->agentnum} @@ -184,13 +192,6 @@ if ( $opt{'agent_virt'} ) { && $curuser->access_right($opt{'agent_null_right'}); } -if ($old && exists($opt{'copy_on_empty'})) { - foreach my $field (@{$opt{'copy_on_empty'}}) { - $new->set($field, $old->get($field)) - unless scalar($cgi->param($field)); - } -} - $error ||= $new->check; my @args = (); |