9444aa70663b6bff058f79ae79705758afb4ed9f
[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 <table>
33 <tr>
34 % if (exists $session{'Attachments'}) {
35 <TD>
36 <&|/l&>Attached file</&>:
37 </TD>
38 <TD COLSPAN=5>
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>
42 % } # end of foreach
43 </TD>
44 </TR>
45 <TR>
46 % } # end of if
47 <tr><td align=right><&|/l&>Attach</&>:</td><td><input name="Attach" type="file"><input type="hidden" name="UpdateAttach" value="1">
48 </td></tr>
49 </table>
50 <& /Elements/MessageBox, Name=>"UpdateContent", QuoteTransaction=>$ARGS{QuoteTransaction} &>
51                 <INPUT TYPE=HIDDEN NAME=id VALUE="<%$Ticket->Id%>"><br>
52
53
54 <& /Elements/Submit &>
55   </FORM>
56
57
58
59 <%INIT>
60
61 my $Ticket = LoadTicket($id);
62
63 my $title = loc("Update ticket #[_1]", $Ticket->id);
64
65 $DefaultStatus = $Ticket->Status() unless ($DefaultStatus);
66
67
68 Abort(loc("No permission to view update ticket")) 
69         unless ( $Ticket->CurrentUserHasRight('ReplyToTicket') or
70                      $Ticket->CurrentUserHasRight('ModifyTicket') ); 
71
72 </%INIT>
73
74 <%ARGS>
75 $id => undef
76 $Action => undef
77 $DefaultStatus => undef
78 </%ARGS>