1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
|
<& /Elements/Header, Title=> $title &>
<& /Ticket/Elements/Tabs, Ticket => $Ticket &>
<& /Elements/TitleBoxStart, title => "Update ticket" &>
<FORM ACTION="Display.html" NAME="TicketUpdate"
METHOD=POST enctype="multipart/form-data">
<TABLE>
<TR><TD>
<a href="ModifyPeople.html?id=<%$Ticket->Id%>">Ticket watchers</A></TD><TD align=right>
Requestor:
</TD><TD>
<b><% $Ticket->RequestorsAsString %></b>
</TD></TR>
<TR><TD> </TD><TD align=right>
Cc:
</TD><TD>
<b><% $Ticket->CcAsString %></b>
</TD></TR>
<TR><TD> </TD><TD align=right>
AdminCc:
</TD><TD>
<b><% $Ticket->AdminCcAsString %></b>
</TD></TR>
</TR>
</TABLE>
<hr>
<TABLE BORDER=0>
<tr><td align=right>Status:</td>
<td>
<& /Elements/SelectStatus, Name=>"Status", Default => $DefaultStatus &>
Owner:
<& /Elements/SelectOwner, Name=>"Owner", Default => $Ticket->OwnerObj->Id(), QueueObj => $Ticket->QueueObj, TicketObj => $Ticket &>
Worked: <input size=4 name="UpdateTimeWorked"> minutes</td></tr>
<tr><td align=right>Update Type:</td>
<td><select name="UpdateType">
% if ($CanComment) {
<option value="private" <%$CommentDefault%>>Comments (Not sent to requestors)</option>
% }
% if ($CanRespond) {
<option value="response" <%$ResponseDefault%>>Response to requestors</option>
% }
</select>
</td></tr>
<tr><td align=right>Subject:</td><td> <input name="UpdateSubject" size=60 value="<%$Ticket->Subject()%>"></td></tr>
<tr><td align=right>Cc:</td><td> <input name="UpdateCc" size=60><BR>
<i><font size=-2>(Sends a carbon-copy of this update to a comma-delimited list
of email addresses. Does <b>not</b> change who will receive future updates.)</font></i>
</td></tr>
<tr><td align=right>Bcc:</td><td> <input name="UpdateBcc" size=60><BR>
<i><font size=-2>(Sends a blind carbon-copy of this update to a comma-delimited list
of email addresses. Does <b>not</b> change who will receive future updates.)</font></i>
</td></tr>
<tr><td align=right>Attach:</td><td><input name="UpdateAttachment" type="file"></td></tr>
</table>
<& /Elements/MessageBox, Name=>"UpdateContent", QuoteTransaction=>$ARGS{QuoteTransaction} &>
<INPUT TYPE=HIDDEN NAME=id VALUE="<%$Ticket->Id%>"><br>
<& /Elements/TitleBoxEnd &>
<& /Elements/Submit &>
</FORM>
<%INIT>
my $CanRespond = 0;
my $CanComment = 0;
my $title;
my $Ticket = LoadTicket($id);
if ($DefaultStatus eq 'resolved') {
$title = "Resolve";
} else {
$title = "Update";
}
$title .= " ticket #" . $Ticket->id . " (" .$Ticket->Subject.")";
# Things needed in the template - we'll do the processing here, just
# for the convinience:
my $CommentDefault=$Action eq "Comment" ? "SELECTED" : "";
my $ResponseDefault=$Action eq "Respond" ? "SELECTED" : "";
$DefaultStatus = $Ticket->Status() unless ($DefaultStatus);
$CanRespond = 1 if ( $Ticket->CurrentUserHasRight('ReplyToTicket') or
$Ticket->CurrentUserHasRight('ModifyTicket') );
$CanComment = 1 if ( $Ticket->CurrentUserHasRight('CommentOnTicket') or
$Ticket->CurrentUserHasRight('ModifyTicket') );
</%INIT>
<%ARGS>
$id => undef
$Action => undef
$DefaultStatus => undef
</%ARGS>
|