[rt-users] Multiple attachments from SelfService ticket creation page

Nick Kartsioukas change+lists.rt at nightwind.net
Fri Sep 25 15:00:32 EDT 2009


The ability to add multiple attachments when creating a ticket from the
SelfService interface was requested from some of our users.  I copied
the chunk of attachment code from share/html/Ticket/Create.html into the
SelfService Create.html file, and the "Add More" button shows up...but
when I click it, it submits the ticket instead of letting me add an
additional attachment.  Any tips?


Original snippet from Create.html:
<tr>
<td class="label">
%# FIXME: if failed customfields validation, attachement needs to be
choosen
%# again by user.
<&|/l&>Attach file</&>:
</td>
<td class="value">
<input name="Attach" type="file" />
</td>
</tr>

Replaced with:
<tr>
% if (exists $session{'Attachments'}) {
<td class="label">
<&|/l&>Attached file</&>:
</td>
<td colspan="5">
<&|/l&>Check box to delete</&><br />
% foreach my $attach_name (keys %{$session{'Attachments'}}) {
<input type="checkbox" class="checkbox"
name="DeleteAttach-<%$attach_name%>" value="1" /><%$attach_name%><br />
% } # end of foreach
</td>
</tr>
<tr>
% } # end of if
<td class="label">
<&|/l&>Attach file</&>:
</td>
<td class="value" colspan="5">
<input type="file" name="Attach" />
<input type="submit" class="button" name="AddMoreAttach"
value="<&|/l&>Add More Files</&>" />
</td>
</tr>



More information about the rt-users mailing list