X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/4699b274533502b138cb737f0d2dcad88e3624a2..2409735739fd290ad659b6d5aab83ff00dbcacef:/bin/mozilla/gl.pl diff --git a/bin/mozilla/gl.pl b/bin/mozilla/gl.pl index c2a2f02d5..14a58b4a6 100644 --- a/bin/mozilla/gl.pl +++ b/bin/mozilla/gl.pl @@ -96,6 +96,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 } }; my $dummy_form = {}; @@ -138,6 +139,8 @@ sub load_record_template { $::form->{"${_}_${row}"} = $item->$_ for qw(source memo project_id); } + $::form->{$_} = $form_defaults->{$_} for keys %{ $form_defaults // {} }; + flash('info', $::locale->text("The record template '#1' has been loaded.", $template->template_name)); update(