From: Moritz Bunkus Date: Wed, 20 Apr 2016 12:09:09 +0000 (+0200) Subject: Brieffunktion: Löschen von Entwürfen gefixt X-Git-Tag: release-3.4.1~188 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=b61d4f497e0287e399dd4c3ccde2d8cebd7c643e;p=kivitendo-erp.git Brieffunktion: Löschen von Entwürfen gefixt --- 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 @@ - +