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>
32 <&|/l&>Attach</&>: <input name="UpdateAttachment" type=file><br>
33 <& /Elements/MessageBox, Name=>"UpdateContent", QuoteTransaction=>$ARGS{QuoteTransaction} &>
34 <INPUT TYPE=HIDDEN NAME=id VALUE="<%$Ticket->Id%>"><br>
37 <& /Elements/Submit &>
44 my $Ticket = LoadTicket($id);
46 my $title = loc("Update ticket #[_1]", $Ticket->id);
48 $DefaultStatus = $Ticket->Status() unless ($DefaultStatus);
51 Abort(loc("No permission to view update ticket"))
52 unless ( $Ticket->CurrentUserHasRight('ReplyToTicket') or
53 $Ticket->CurrentUserHasRight('ModifyTicket') );
60 $DefaultStatus => undef