From b61d4f497e0287e399dd4c3ccde2d8cebd7c643e Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Wed, 20 Apr 2016 14:09:09 +0200 Subject: [PATCH] =?utf8?q?Brieffunktion:=20L=C3=B6schen=20von=20Entw=C3=BC?= =?utf8?q?rfen=20gefixt?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/Controller/Letter.pm | 5 ++++- templates/webpages/letter/load_drafts.html | 6 +++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/SL/Controller/Letter.pm b/SL/Controller/Letter.pm index e9fe6cf75..bdef557bb 100644 --- a/SL/Controller/Letter.pm +++ b/SL/Controller/Letter.pm @@ -308,7 +308,10 @@ sub action_skip_draft { sub action_delete_drafts { my ($self) = @_; - delete_letter_drafts(); + + my @ids = @{ $::form->{ids} || [] }; + SL::DB::Manager::LetterDraft->delete_all(where => [ id => \@ids ]) if @ids; + $self->action_add(skip_drafts => 1); } diff --git a/templates/webpages/letter/load_drafts.html b/templates/webpages/letter/load_drafts.html index 33cc9469e..f2455ecd4 100644 --- a/templates/webpages/letter/load_drafts.html +++ b/templates/webpages/letter/load_drafts.html @@ -1,5 +1,5 @@ [%- USE T8 %] -[%- USE HTML %] +[%- USE HTML %][%- USE L -%]

[% 'Load letter draft' | $T8 %]

@@ -19,7 +19,7 @@ [% FOREACH row = LETTER_DRAFTS %] - + [% L.checkbox_tag("ids[+]", value=row.id) %] [% row.date.to_kivitendo | html %] [% row.subject | html %] [% row.customer.displayable_name | html %] @@ -32,7 +32,7 @@ - + -- 2.20.1