Revision b61d4f49
Von Moritz Bunkus vor mehr als 8 Jahren hinzugefügt
SL/Controller/Letter.pm | ||
---|---|---|
308 | 308 |
|
309 | 309 |
sub action_delete_drafts { |
310 | 310 |
my ($self) = @_; |
311 |
delete_letter_drafts(); |
|
311 |
|
|
312 |
my @ids = @{ $::form->{ids} || [] }; |
|
313 |
SL::DB::Manager::LetterDraft->delete_all(where => [ id => \@ids ]) if @ids; |
|
314 |
|
|
312 | 315 |
$self->action_add(skip_drafts => 1); |
313 | 316 |
} |
314 | 317 |
|
templates/webpages/letter/load_drafts.html | ||
---|---|---|
1 | 1 |
[%- USE T8 %] |
2 |
[%- USE HTML %] |
|
2 |
[%- USE HTML %][%- USE L -%]
|
|
3 | 3 |
<h1>[% 'Load letter draft' | $T8 %]</h1> |
4 | 4 |
|
5 | 5 |
<form method="post" name="Form" action="controller.pl"> |
... | ... | |
19 | 19 |
|
20 | 20 |
[% FOREACH row = LETTER_DRAFTS %] |
21 | 21 |
<tr class="listrow[% loop.count % 2 %]"> |
22 |
<td><input type="checkbox" name="checked_[% row.id %]" value="1"></td>
|
|
22 |
<td>[% L.checkbox_tag("ids[+]", value=row.id) %]</td>
|
|
23 | 23 |
<td>[% row.date.to_kivitendo | html %]</td> |
24 | 24 |
<td><a href="[% SELF.url_for(action='edit', 'draft.id'=row.id) %]">[% row.subject | html %]</a></td> |
25 | 25 |
<td>[% row.customer.displayable_name | html %]</td> |
... | ... | |
32 | 32 |
<td> |
33 | 33 |
<input type="hidden" name="action" value="Letter/dispatch"> |
34 | 34 |
<input type="submit" class="submit" name="action_skip_draft" value="[% 'Skip' | $T8 %]"> |
35 |
<input type="submit" class="submit" name="action_delete_draft" value="[% 'Delete drafts' | $T8 %]"> |
|
35 |
<input type="submit" class="submit" name="action_delete_drafts" value="[% 'Delete drafts' | $T8 %]">
|
|
36 | 36 |
</td> |
37 | 37 |
</tr> |
38 | 38 |
</table> |
Auch abrufbar als: Unified diff
Brieffunktion: Löschen von Entwürfen gefixt