From: Sven Schöling Date: Tue, 19 Jul 2016 17:25:18 +0000 (+0200) Subject: Drafts: load kann jetzt zusätzliche Argumente aus form übernehmen X-Git-Tag: release-3.5.4~2200 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=a8e3100cce96084268ed6905033c99fffd8af776;p=kivitendo-erp.git Drafts: load kann jetzt zusätzliche Argumente aus form übernehmen --- diff --git a/SL/Controller/Draft.pm b/SL/Controller/Draft.pm index 9eff3fcfb..3f03f2c67 100644 --- a/SL/Controller/Draft.pm +++ b/SL/Controller/Draft.pm @@ -82,10 +82,16 @@ sub action_load { require $allowed_modules{ $self->draft->module }; } + + my $params = delete $::form->{form}; my $new_form = YAML::Load($self->draft->form); $::form->{$_} = $new_form->{$_} for keys %$new_form; $::form->{"draft_$_"} = $self->draft->$_ for qw(id description); + if ($params && 'HASH' eq ref $params) { + $::form->{$_} = $params->{$_} for keys %$params; + } + $::form->{script} = $self->draft->module . '.pl'; ::update(); }