From ed667cac4097e2f2e62c7dd440eb0977da53b339 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Tue, 24 May 2016 11:23:31 +0200 Subject: [PATCH] Drafts: gl auch eingebunden --- SL/Controller/Draft.pm | 2 +- bin/mozilla/gl.pl | 5 +---- templates/webpages/gl/form_footer.html | 6 +----- templates/webpages/gl/form_header.html | 1 + 4 files changed, 4 insertions(+), 10 deletions(-) diff --git a/SL/Controller/Draft.pm b/SL/Controller/Draft.pm index 33da3bd1a..9eff3fcfb 100644 --- a/SL/Controller/Draft.pm +++ b/SL/Controller/Draft.pm @@ -19,7 +19,7 @@ use Rose::Object::MakeMethods::Generic ( __PACKAGE__->run_before('check_auth'); -my %allowed_modules = map { $_ => "bin/mozilla/$_.pl" } qw(is ir ar ap); +my %allowed_modules = map { $_ => "bin/mozilla/$_.pl" } qw(is ir ar ap gl); # # actions diff --git a/bin/mozilla/gl.pl b/bin/mozilla/gl.pl index 1040705db..8a8181917 100644 --- a/bin/mozilla/gl.pl +++ b/bin/mozilla/gl.pl @@ -45,7 +45,6 @@ use SL::ReportGenerator; use SL::DBUtils qw(selectrow_query); require "bin/mozilla/common.pl"; -require "bin/mozilla/drafts.pl"; require "bin/mozilla/reportgenerator.pl"; # this is for our long dates @@ -84,8 +83,6 @@ sub add { my $form = $main::form; my %myconfig = %main::myconfig; - return $main::lxdebug->leave_sub() if (load_draft_maybe()); - $form->{title} = "Add"; $form->{callback} = "gl.pl?action=add" unless $form->{callback}; @@ -1160,7 +1157,7 @@ sub post { post_transaction(); - $form->{callback} = build_std_url("action=add&DONT_LOAD_DRAFT=1", "show_details"); + $form->{callback} = build_std_url("action=add", "show_details"); $form->redirect($form->{callback}); $main::lxdebug->leave_sub(); diff --git a/templates/webpages/gl/form_footer.html b/templates/webpages/gl/form_footer.html index ede815bc7..054aa5a85 100644 --- a/templates/webpages/gl/form_footer.html +++ b/templates/webpages/gl/form_footer.html @@ -35,13 +35,9 @@ [% L.submit_tag('action', LxERP.t8('Follow-Up'), onclick='follow_up_window()') %] [%- ELSE %] - [%- IF draft_id %] -

[% L.checkbox_tag('remove_draft', checked=remove_draft, label=LxERP.t8('Remove Draft')) %]

- [%- END %] - [% L.submit_tag('action', LxERP.t8('Update'), id='update_button') %] [% L.submit_tag('action', LxERP.t8('Post')) %] - [% L.submit_tag('action', LxERP.t8('Save Draft')) %] + [% L.button_tag('kivi.Draft.popup("gl", "unknown", "' _ draft_id _ '", "' _ draft_description _ '")', LxERP.t8('Drafts')) %] [% L.hidden_tag('draft_id', draft_id) %] [% L.hidden_tag('draft_description', draft_description) %] [%- END %] diff --git a/templates/webpages/gl/form_header.html b/templates/webpages/gl/form_header.html index e349761cf..1ad7197e8 100644 --- a/templates/webpages/gl/form_header.html +++ b/templates/webpages/gl/form_header.html @@ -34,6 +34,7 @@ function updateTaxes(row) +
-- 2.20.1