/
AgentTicketPhone.tt
359 lines (320 loc) · 21.1 KB
/
AgentTicketPhone.tt
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
# --
# Copyright (C) 2001-2021 OTRS AG, https://otrs.com/
# Copyright (C) 2021 Znuny GmbH, https://znuny.org/
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (GPL). If you
# did not receive this file, see https://www.gnu.org/licenses/gpl-3.0.txt.
# --
<div class="MainBox ARIARoleMain FormScreen">
[% IF Data.TicketID %]
<h1>[% Translate("Split Into New Phone Ticket") | html %]</h1>
[% ELSIF Data.FromChatID %]
<h1>[% Translate("Save Chat Into New Phone Ticket") | html %]</h1>
[% ELSE %]
<h1>[% Translate("Create New Phone Ticket") | html %]</h1>
[% END %]
<p class="AsteriskExplanation">[% Translate("All fields marked with an asterisk (*) are mandatory.") | html %]</p>
<div class="LayoutFixedSidebar SidebarLast">
<div class="SidebarColumn">
[% RenderBlockStart("CustomerTable") %]
<div id="CustomerInfo" class="WidgetSimple">
<div class="Header">
<h2>[% Translate("Customer Information") | html %]</h2>
</div>
<div class="Content">
[% Data.CustomerTable %]
</div>
</div>
[% RenderBlockEnd("CustomerTable") %]
</div>
<div class="ContentColumn">
<form action="[% Env("CGIHandle") %]" method="post" enctype="multipart/form-data" name="compose" id="NewPhoneTicket" class="Validate PreventMultipleSubmits">
<input type="hidden" name="Action" value="[% Env("Action") %]"/>
<input type="hidden" name="Subaction" value="StoreNew"/>
<input type="hidden" name="FormID" value="[% Data.FormID | html %]"/>
<input type="hidden" name="ExpandCustomerName" id="ExpandCustomerName" value="0"/>
<input type="hidden" name="OwnerAll" id="OwnerAll" value="[% Data.OwnerAll | html %]"/>
<input type="hidden" name="ResponsibleAll" id="ResponsibleAll" value="[% Data.ResponsibleAll | html %]"/>
<input type="hidden" name="PreSelectedCustomerUser" id="PreSelectedCustomerUser" value=""/>
<input type="hidden" name="SelectedCustomerUser" id="SelectedCustomerUser" value="[% Data.CustomerUser | html %]"/>
<input type="hidden" name="TicketID" value="[% Data.TicketID | html %]"/>
<input type="hidden" name="LinkTicketID" value="[% Data.LinkTicketID | html %]"/>
<input type="hidden" name="FromChatID" value="[% Data.FromChatID | html %]"/>
<fieldset class="TableLike">
# example template for customizations, see hidden form at the end of the file
# <label>[% Translate("Templates") | html %]:</label>
# <div class="Field">
# <button type="button" onclick="$('#Template1').submit()" value="[% Translate("Example Template") | html %]">[% Translate("Example Template") | html %]</button>
# </div>
# <div class="Clear"></div>
[% RenderBlockStart("TicketType") %]
<label class="Mandatory" for="TypeID"><span class="Marker">*</span> [% Translate("Type") | html %]:</label>
<div class="Field">
[% Data.TypeStrg %]
<div id="TypeIDError" class="TooltipErrorMessage"><p>[% Translate("This field is required.") | html %]</p></div>
<div id="TypeIDServerError" class="TooltipErrorMessage"><p>[% Translate("This field is required.") | html %]</p></div>
</div>
<div class="Clear"></div>
[% RenderBlockEnd("TicketType") %]
<label for="FromCustomer" class="Mandatory"><span class="Marker">*</span>[% Translate("Customer user") | html %]:</label>
<div class="Field">
<input id="FromCustomer" type="text" name="FromCustomer" value="" class="CustomerAutoComplete W75pc [% Data.FromInvalid | html %]" autocomplete="off" />
<div id="FromCustomerServerError" class="TooltipErrorMessage">
[% RenderBlockStart("FromServerErrorMsg") %]
<p>[% Translate("Please include at least one customer for the ticket.") | html %]</p>
[% RenderBlockEnd("FromServerErrorMsg") %]
</div>
</div>
<div class="Clear"></div>
<div class="Field [% Data.CustomerHiddenContainer | html %]">
<div class="CustomerTicketTemplateFromCustomer SpacingTopSmall Hidden">
<input name="CustomerSelected" title="[% Translate("Select this customer as the main customer.") | html %]" id="CustomerSelected" class="CustomerTicketRadio" type="radio" value=""/>
<input name="CustomerKey" id="CustomerKey" class="CustomerKey" type="hidden" value=""/>
<input class="CustomerTicketText Radio" title="[% Translate("Customer user") | html %]" name="CustomerTicketText" id="CustomerTicketText" type="text" value="" readonly="readonly" />
<a href="#" id="RemoveCustomerTicket" class="RemoveButton CustomerTicketRemove">
<i class="fa fa-minus-square-o"></i>
<span class="InvisibleText">[% Translate("Remove Ticket Customer User") | html %]</span>
</a>
</div>
<div id="TicketCustomerContentFromCustomer" class="CustomerContainer">
[% RenderBlockStart("MultipleCustomer") %]
<div class="SpacingTopSmall ">
<input name="CustomerSelected" title="[% Translate("Select this customer as the main customer.") | html %]" id="CustomerSelected" class="CustomerTicketRadio" type="radio" value="[% Data.Count | html %]" [% Data.CustomerSelected | html %] [% Data.CustomerDisabled | html %] />
<input name="CustomerKey_[% Data.Count | html %]" id="CustomerKey_[% Data.Count | html %]" class="CustomerKey" type="hidden" value="[% Data.CustomerKey | html %]"/>
<input class="CustomerTicketText Radio [% Data.CustomerError | html %]" title="[% Translate("Customer user") | html %]" name="CustomerTicketText_[% Data.Count %]" id="CustomerTicketText_[% Data.Count %]" type="text" value="[% Data.CustomerElement | html %]" readonly="readonly" />
<a href="#" id="RemoveCustomerTicket_[% Data.Count %]" class="RemoveButton CustomerTicketRemove">
<i class="fa fa-minus-square-o"></i>
<span class="InvisibleText">[% Translate("Remove Ticket Customer User") | html %]</span>
</a>
[% RenderBlockStart("CustomerErrorExplantion") %]
<p class="Explanation Error">[% Translate("Please remove this entry and enter a new one with the correct value.") | html %]</p>
[% RenderBlockEnd("CustomerErrorExplantion") %]
<div id="CustomerTicketText_[% Data.Count %]ServerError" class="TooltipErrorMessage">
[% RenderBlockStart("CustomerGenericServerErrorMsg") %]
<p>[% Translate("This field is required.") | html %]</p>
[% RenderBlockEnd("CustomerGenericServerErrorMsg") %]
[% RenderBlockStart("InvalidConfigServerErrorMsg") %]
<p>[% Translate("This email address is not allowed due to the system configuration.") | html %]</p>
[% RenderBlockEnd("InvalidConfigServerErrorMsg") %]
[% RenderBlockStart("InvalidMXServerErrorMsg") %]
<p>[% Translate("This email address failed MX check.") | html %]</p>
[% RenderBlockEnd("InvalidMXServerErrorMsg") %]
[% RenderBlockStart("InvalidDNSServerErrorMsg") %]
<p>[% Translate("DNS problem, please check your configuration and the error log.") | html %]</p>
[% RenderBlockEnd("InvalidDNSServerErrorMsg") %]
[% RenderBlockStart("InvalidSyntaxServerErrorMsg") %]
<p>[% Translate("The syntax of this email address is incorrect.") | html %]</p>
[% RenderBlockEnd("InvalidSyntaxServerErrorMsg") %]
[% RenderBlockStart("IsDuplicatedServerErrorMsg") %]
<p>[% Translate("This address already exists on the address list.") | html %]</p>
[% RenderBlockEnd("IsDuplicatedServerErrorMsg") %]
</div>
</div>
[% RenderBlockEnd("MultipleCustomer") %]
</div>
[% RenderBlockStart("MultipleCustomerCounter") %]
<input name="CustomerTicketCounterFromCustomer" id="CustomerTicketCounterFromCustomer" type="hidden" value="[% Data.CustomerCounter | html %]"/>
[% RenderBlockEnd("MultipleCustomerCounter") %]
</div>
<div class="Clear"></div>
[% INCLUDE "CustomerCompany/TicketCustomerIDSelection.tt" Required = 0 Readonly = Config("Ticket::Frontend::AgentTicketPhone::CustomerIDReadOnly") %]
<label class="Mandatory" for="Dest"><span class="Marker">*</span> [% Translate("To queue") | html %]:</label>
<div class="Field">
[% Data.ToStrg %]
<div id="DestError" class="TooltipErrorMessage" ><p>[% Translate("This field is required.") | html %]</p></div>
<div id="DestServerError" class="TooltipErrorMessage"><p>[% Translate("This field is required.") | html %]</p></div>
</div>
<div class="Clear"></div>
[% RenderBlockStart("TicketService") %]
[% IF Data.ServiceMandatory %]
<label class="Mandatory" for="ServiceID"><span class="Marker">*</span> [% Translate("Service") | html %]:</label>
[% ELSE %]
<label for="ServiceID">[% Translate("Service") | html %]:</label>
[% END %]
<div class="Field">
[% Data.ServiceStrg %]
[% IF Data.ServiceMandatory %]
<div id="ServiceIDError" class="TooltipErrorMessage" ><p>[% Translate("This field is required.") | html %]</p></div>
[% END %]
<div id="ServiceIDServerError" class="TooltipErrorMessage"><p>[% Translate("Service invalid.") | html %]</p></div>
</div>
<div class="Clear"></div>
[% RenderBlockEnd("TicketService") %]
[% RenderBlockStart("TicketSLA") %]
[% IF Data.SLAMandatory %]
<label class="Mandatory" for="SLAID"><span class="Marker">*</span> [% Translate("Service Level Agreement") | html %]:</label>
[% ELSE %]
<label for="SLAID">[% Translate("Service Level Agreement") | html %]:</label>
[% END %]
<div class="Field">
[% Data.SLAStrg %]
[% IF Data.SLAMandatory %]
<div id="SLAIDError" class="TooltipErrorMessage" ><p>[% Translate("This field is required.") | html %]</p></div>
<div id="SLAIDServerError" class="TooltipErrorMessage"><p>[% Translate("This field is required.") | html %]</p></div>
[% END %]
</div>
<div class="Clear"></div>
[% RenderBlockEnd("TicketSLA") %]
[% RenderBlockStart("OwnerSelection") %]
<label for="NewUserID">[% Translate("Owner") | html %]:</label>
<div class="Field">
[% Data.OptionStrg %]
<a href="#" id="OwnerSelectionGetAll" class="GetAllAJAX" title="[% Translate("Get all") | html %]">
<span>[% Translate("Get all") | html %]</span>
<i class="fa fa-refresh"></i>
</a>
</div>
<div class="Clear"></div>
[% RenderBlockEnd("OwnerSelection") %]
[% RenderBlockStart("ResponsibleSelection") %]
<label for="NewResponsibleID">[% Translate("Responsible") | html %]:</label>
<div class="Field">
[% Data.ResponsibleOptionStrg %]
<a href="#" id="ResponsibleSelectionGetAll" class="GetAllAJAX" title="[% Translate("Get all") | html %]">
<span>[% Translate("Get all") | html %]</span>
<i class="fa fa-refresh"></i>
</a>
</div>
<div class="Clear"></div>
[% RenderBlockEnd("ResponsibleSelection") %]
<label class="Mandatory" for="Subject"><span class="Marker">*</span> [% Translate("Subject") | html %]:</label>
<div class="Field">
<input class="W75pc Validate_Required [% Data.SubjectInvalid | html %]" type="text" name="Subject" id="Subject" value="[% Data.Subject | html %]"/>
<div id="SubjectError" class="TooltipErrorMessage">
<p>[% Translate("This field is required.") | html %]</p>
</div>
<div id="SubjectServerError" class="TooltipErrorMessage">
<p>[% Translate("This field is required.") | html %]</p>
</div>
</div>
<div class="Clear"></div>
[% RenderBlockStart("TicketOptions") %]
<label>[% Translate("Options") | html %]:</label>
<div class="Field">
<!-- OutputFilterHook_TicketOptionsBegin -->
[% RenderBlockStart("OptionCustomer") %]
<a href="#" id="OptionCustomer">[ [% Translate("Customer user") | html %] ]</a>
[% RenderBlockEnd("OptionCustomer") %]
<!-- OutputFilterHook_TicketOptionsEnd -->
</div>
<div class="Clear"></div>
[% RenderBlockEnd("TicketOptions") %]
<!-- OutputFilterHook_NoTicketOptionsFallback -->
[% RenderBlockStart("StandardTemplate") %]
<label for="StandardTemplateID">[% Translate("Text Template") | html %]:</label>
<div class="Field">
[% Data.StandardTemplateStrg %]
<p class="FieldExplanation">[% Translate("Setting a template will overwrite any text or attachment.") | html %]</p>
</div>
<div class="Clear"></div>
[% RenderBlockEnd("StandardTemplate") %]
<label class="Mandatory" for="RichText"><span class="Marker">*</span> [% Translate("Text") | html %]:</label>
<div id="RichTextField" class="RichTextField">
<textarea id="RichText" class="RichText Validate_Required [% Data.RichTextInvalid | html %]" name="Body" title="[% Translate("Message body") | html %]" rows="15" cols="[% Config("Ticket::Frontend::TextAreaNote") | html %]">[% Data.Body | html %]</textarea>
<div id="RichTextError" class="TooltipErrorMessage">
<p>[% Translate("This field is required.") | html %]</p>
</div>
<div id="RichTextServerError" class="TooltipErrorMessage">
<p>[% Translate("This field is required.") | html %]</p>
</div>
</div>
<div class="Clear"></div>
<label>[% Translate("Attachments") | html %]:</label>
<div class="Field">
[% INCLUDE "FormElements/AttachmentList.tt" %]
</div>
<div class="Clear"></div>
[% RenderBlockStart("ChatArticlePreview") %]
<label>[% Translate("Chat protocol") | html %]:</label>
<div class="Field">
<div class="ChatProtocol">
[% INCLUDE "ArticleContent/Chat.tt" %]
</div>
<p class="FieldExplanation">[% Translate('The chat will be appended as a separate article.') | html %]
</div>
<div class="Clear"></div>
[% RenderBlockEnd("ChatArticlePreview") %]
<label for="NextStateID">[% Translate("Next ticket state") | html %]:</label>
<div class="Field">
[% Data.NextStatesStrg %]
</div>
<div class="Clear"></div>
<label>[% Translate("Pending date") | html %]:</label>
<div class="Field">
[% Data.PendingDateString %]
<div id="DayError" class="TooltipErrorMessage"><p>[% Translate("Date invalid!") | html %]</p></div>
<div id="HourError" class="TooltipErrorMessage"><p>[% Translate("Date invalid!") | html %]</p></div>
<p class="FieldExplanation">[% Translate("For all pending* states.") | html %]</p>
</div>
<div class="Clear"></div>
<label for="PriorityID">[% Translate("Priority") | html %]:</label>
<div class="Field">
[% Data.PriorityStrg %]
</div>
<div class="Clear"></div>
[% RenderBlockStart("DynamicField") %]
<div class="Row Row_DynamicField_[% Data.Name | html %]">
[% Data.Label %]
<div class="Field">
[% Data.Field %]
</div>
<div class="Clear"></div>
</div>
[% RenderBlockEnd("DynamicField") %]
# example of how to use fixed dynamic field blocks for customizations
# Note: Field1 and Field2 are the names of the fields and had to be replaced with the actual
# field names
#[% RenderBlockStart("DynamicField_Field1") %]
# <div class="Row Row_DynamicField_[% Data.Name | html %]">
# [% Data.Label %]
# <div class="Field">
# [% Data.Field %]
# </div>
# <div class="Clear"></div>
# </div>
#[% RenderBlockEnd("DynamicField_Field1") %]
#[% RenderBlockStart("DynamicField_Field2") %]
# <div class="Row Row_DynamicField_[% Data.Name | html %]">
# [% Data.Label %]
# <div class="Field">
# [% Data.Field %]
# </div>
# <div class="Clear"></div>
# </div>
#[% RenderBlockEnd("DynamicField_Field2") %]
[% RenderBlockStart("TimeUnitsLabel") %]
<label for="TimeUnits">[% Translate("Time units") | html %] [% Translate(Config("Ticket::Frontend::TimeUnits")) | html %]:</label>
[% RenderBlockEnd("TimeUnitsLabel") %]
[% RenderBlockStart("TimeUnitsLabelMandatory") %]
<label class="Mandatory" for="TimeUnits"><span class="Marker">*</span> [% Translate("Time units") | html %] [% Translate(Config("Ticket::Frontend::TimeUnits")) | html %]:</label>
[% RenderBlockEnd("TimeUnitsLabelMandatory") %]
[% RenderBlockStart("TimeUnits") %]
<div class="Field">
<input type="text" class="W50pc Validate_TimeUnits [% Data.TimeUnitsRequired | html %] [% Data.TimeUnitsInvalid | html %]" name="TimeUnits" id="TimeUnits" value="[% Data.TimeUnits | html %]" />
<div id="TimeUnitsError" class="TooltipErrorMessage"><p>[% Translate("Invalid time!") | html %]</p></div>
<div id="TimeUnitsServerError" class="TooltipErrorMessage"><p>[% Translate("This field is required.") | html %]</p></div>
</div>
<div class="Clear"></div>
[% RenderBlockEnd("TimeUnits") %]
<div class="Field SpacingTop">
<button class="Primary CallForAction" id="submitRichText" accesskey="g" title="[% Translate("Create") | html %] (g)" type="submit" value="[% Translate("Create") | html %]"><span><i class="fa fa-check-square-o"></i> [% Translate("Create") | html %]</span></button>
</div>
</fieldset>
</form>
</div>
<div class="Clear"></div>
</div>
<div id="CustomerTickets"></div>
</div>
# example template form for customizations
#<form action="[% Env("CGIHandle") %]" method="post" enctype="multipart/form-data" id="Template1">
# <input type="hidden" name="Action" value="[% Env("Action") %]"/>
# <input type="hidden" name="Subaction" value="StoreNew"/>
# <input type="hidden" name="FormID" value="[% Data.FormID | html %]"/>
# <input type="hidden" name="ExpandCustomerName" value="1"/>
# <input type="hidden" name="Subject" value="Example Subject"/>
# <input type="hidden" name="Body" value="Name:
#Product:
#Comment:"/>
#</form>