diff options
Diffstat (limited to 'rt/share/html/Ticket/Elements/AddAttachments')
-rw-r--r-- | rt/share/html/Ticket/Elements/AddAttachments | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/rt/share/html/Ticket/Elements/AddAttachments b/rt/share/html/Ticket/Elements/AddAttachments index 9458bbb32..7c1f0b822 100644 --- a/rt/share/html/Ticket/Elements/AddAttachments +++ b/rt/share/html/Ticket/Elements/AddAttachments @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -45,12 +45,14 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -% if (exists $session{'Attachments'}) { +% if ( $attachments ) { <tr><td class="label"><&|/l&>Attached file</&>:</td> <td> <&|/l&>Check box to delete</&><br /> -% foreach my $attach_name (sort keys %{$session{'Attachments'}}) { -<input type="checkbox" class="checkbox" name="DeleteAttach-<%$attach_name%>" value="1" /><%$attach_name%><br /> +% foreach my $attach_name ( sort keys %$attachments ) { +<input type="checkbox" class="checkbox" name="DeleteAttach" value="<% $attach_name %>" id="DeleteAttach-<%$attach_name%>" /> +<label for="DeleteAttach-<%$attach_name%>"><% $attach_name %></label> +<br /> % } # end of foreach </td> </tr> @@ -59,3 +61,12 @@ <tr><td class="label"><&|/l&>Attach</&>:</td><td><input name="Attach" type="file" /><input type="submit" class="button" name="AddMoreAttach" value="<&|/l&>Add More Files</&>" /><input type="hidden" class="hidden" name="UpdateAttach" value="1" /> </td></tr> % $m->callback( %ARGS, CallbackName => 'End' ); +<%ARGS> +$Token => '' +</%ARGS> +<%INIT> +my $attachments; +if ( exists $session{'Attachments'}{ $Token } && keys %{ $session{'Attachments'}{ $Token } } ) { + $attachments = $session{'Attachments'}{ $Token }; +} +</%INIT> |