3 %# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
5 %# (Except where explictly superceded by other copyright notices)
7 %# This work is made available to you under the terms of Version 2 of
8 %# the GNU General Public License. A copy of that license should have
9 %# been provided with this software, but in any event can be snarfed
12 %# This work is distributed in the hope that it will be useful, but
13 %# WITHOUT ANY WARRANTY; without even the implied warranty of
14 %# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 %# General Public License for more details.
17 %# Unless otherwise specified, all modifications, corrections or
18 %# extensions to this work which alter its source code become the
19 %# property of Best Practical Solutions, LLC when submitted for
20 %# inclusion in the work.
24 <& /SelfService/Elements/Header, Title =>loc('Update ticket #[_1]', $Ticket->id) &>
27 <FORM ACTION="Display.html" METHOD=POST ENCTYPE="multipart/form-data">
28 <input type=hidden name="UpdateType" value="response">
30 <&|/l&>Status</&>: <& /Elements/SelectStatus, Name=>"Status", Default => $DefaultStatus &><br>
31 <&|/l&>Subject</&>: <input name="UpdateSubject" size=60 value="Re: <% $Ticket->Subject %>"> <br>
34 % if (exists $session{'Attachments'}) {
36 <&|/l&>Attached file</&>:
39 <&|/l&>Check box to delete</&><BR>
40 % foreach my $attach_name (keys %{$session{'Attachments'}}) {
41 <input type="checkbox" name="DeleteAttach-<%$attach_name%>"><%$attach_name%><BR>
47 <tr><td align=right><&|/l&>Attach</&>:</td><td><input name="Attach" type="file"><input type="hidden" name="UpdateAttach" value="1">
50 <& /Elements/MessageBox, Name=>"UpdateContent", QuoteTransaction=>$ARGS{QuoteTransaction} &>
51 <INPUT TYPE=HIDDEN NAME=id VALUE="<%$Ticket->Id%>"><br>
54 <& /Elements/Submit &>
61 my $Ticket = LoadTicket($id);
63 my $title = loc("Update ticket #[_1]", $Ticket->id);
65 $DefaultStatus = $Ticket->Status() unless ($DefaultStatus);
68 Abort(loc("No permission to view update ticket"))
69 unless ( $Ticket->CurrentUserHasRight('ReplyToTicket') or
70 $Ticket->CurrentUserHasRight('ModifyTicket') );
77 $DefaultStatus => undef