X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/1ce68041a1923c60a6608a2ed6365f5915bacd9a..b8741ec3:/bin/mozilla/ap.pl diff --git a/bin/mozilla/ap.pl b/bin/mozilla/ap.pl index 9018dd905..b45cb99c5 100644 --- a/bin/mozilla/ap.pl +++ b/bin/mozilla/ap.pl @@ -103,6 +103,7 @@ sub load_record_template { $template->substitute_variables; # Clean the current $::form before rebuilding it from the template. + my $form_defaults = delete $::form->{form_defaults}; delete @{ $::form }{ grep { !m{^(?:script|login)$}i } keys %{ $::form } }; # Fill $::form from the template. @@ -150,6 +151,8 @@ sub load_record_template { $::form->{"project_id_${row}"} = $item->project_id; } + $::form->{$_} = $form_defaults->{$_} for keys %{ $form_defaults // {} }; + flash('info', $::locale->text("The record template '#1' has been loaded.", $template->template_name)); update(