import of rt 3.0.4
[freeside.git] / rt / html / SelfService / Update.html
1 %# BEGIN LICENSE BLOCK
2 %# 
3 %# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
4 %# 
5 %# (Except where explictly superceded by other copyright notices)
6 %# 
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
10 %# from www.gnu.org.
11 %# 
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.
16 %# 
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.
21 %# 
22 %# 
23 %# END LICENSE BLOCK
24 <& /SelfService/Elements/Header, Title =>loc('Update ticket #[_1]', $Ticket->id) &>
25
26
27 <FORM ACTION="Display.html" METHOD=POST ENCTYPE="multipart/form-data">
28 <input type=hidden name="UpdateType" value="response">
29
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>
35
36
37 <& /Elements/Submit &>
38   </FORM>
39
40
41
42 <%INIT>
43
44 my $Ticket = LoadTicket($id);
45
46 my $title = loc("Update ticket #[_1]", $Ticket->id);
47
48 $DefaultStatus = $Ticket->Status() unless ($DefaultStatus);
49
50
51 Abort(loc("No permission to view update ticket")) 
52         unless ( $Ticket->CurrentUserHasRight('ReplyToTicket') or
53                      $Ticket->CurrentUserHasRight('ModifyTicket') ); 
54
55 </%INIT>
56
57 <%ARGS>
58 $id => undef
59 $Action => undef
60 $DefaultStatus => undef
61 </%ARGS>