X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/b75d945678798231abf5ae1d98068e824b0bb7f9..25a5cdc82f6ca252d7030df5bf8e9343e9b53fb4:/bin/mozilla/gl.pl diff --git a/bin/mozilla/gl.pl b/bin/mozilla/gl.pl index 185e2a587..0bb5274ec 100644 --- a/bin/mozilla/gl.pl +++ b/bin/mozilla/gl.pl @@ -41,6 +41,7 @@ use SL::PE; use SL::ReportGenerator; require "bin/mozilla/common.pl"; +require "bin/mozilla/drafts.pl"; require "bin/mozilla/reportgenerator.pl"; 1; @@ -80,6 +81,8 @@ sub add { $auth->assert('general_ledger'); + return $lxdebug->leave_sub() if (load_draft_maybe()); + $form->{title} = "Add"; $form->{callback} = "gl.pl?action=add" unless $form->{callback}; @@ -1292,9 +1295,20 @@ $follow_ups_block . qq|"> |; } else { + if ($form->{draft_id}) { + my $remove_draft_checked = 'checked' if ($form->{remove_draft}); + print qq|
\n| + . qq| | + . qq| \n| + . qq|
\n|; + } + print qq| - |; + | + . NTI($cgi->submit('-name' => 'action', '-value' => $locale->text('Save draft'), '-class' => 'submit')) + . $cgi->hidden('-name' => 'draft_id', '-default' => [$form->{draft_id}]) + . $cgi->hidden('-name' => 'draft_description', '-default' => [$form->{draft_description}]); } print " @@ -1519,6 +1533,8 @@ sub post { post_transaction(); + remove_draft() if $form->{remove_draft}; + $form->{callback} = build_std_url("action=add", "show_details"); $form->redirect($form->{callback});