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 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537
|
# --
# Copyright (C) 2001-2017 OTRS AG, http://otrs.com/
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --
[% InsertTemplate("AgentCustomerSearch.tt") %]
<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>
[% WRAPPER JSOnDocumentComplete %]
<script type="text/javascript">//<![CDATA[
$('#TypeID').bind('change', function (Event) {
Core.AJAX.FormUpdate($('#NewPhoneTicket'), 'AJAXUpdate', 'TypeID', ['Dest', 'NewUserID', 'NewResponsibleID', 'NextStateID', 'PriorityID', 'ServiceID', 'SLAID', 'SignKeyID', 'CryptKeyID', 'To', 'Cc', 'Bcc', 'StandardTemplateID' [% Data.DynamicFieldNamesStrg %]]);
});
//]]></script>
[% END %]
</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>
[% WRAPPER JSOnDocumentComplete %]
<script type="text/javascript">//<![CDATA[
$('.CustomerTicketRadio').bind('change', function () {
var CustomerKey;
if ( $(this).prop('checked') ){
CustomerKey = $( '#CustomerKey_' +$(this).val() ).val();
// get customer tickets
Core.Agent.CustomerSearch.ReloadCustomerInfo(CustomerKey);
}
return false;
});
$('.CustomerTicketRemove').bind('click', function () {
Core.Agent.CustomerSearch.RemoveCustomerTicket( $(this) );
return false;
});
//]]></script>
[% END %]
[% RenderBlockStart("FromExternalCustomer") %]
[% WRAPPER JSOnDocumentComplete %]
<script type="text/javascript">//<![CDATA[
Core.Agent.CustomerSearch.AddTicketCustomer( 'FromCustomer', "[% Data.Email | html %]", "[% Data.Customer | html %]", true );
//]]></script>
[% END %]
[% RenderBlockEnd("FromExternalCustomer") %]
<label for="CustomerID">[% Translate("CustomerID") | html %]:</label>
<div class="Field">
<input type="text" name="CustomerID" id="CustomerID" value="[% Data.CustomerID | html %]" [% IF Config("Ticket::Frontend::AgentTicketPhone::CustomerIDReadOnly") %] readonly [% END %] class="W75pc"/>
</div>
<div class="Clear"></div>
<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>
[% WRAPPER JSOnDocumentComplete %]
<script type="text/javascript">//<![CDATA[
$('#Dest').bind('change', function (Event) {
Core.AJAX.FormUpdate($('#NewPhoneTicket'), 'AJAXUpdate', 'Dest', ['TypeID', 'NewUserID', 'NewResponsibleID', 'NextStateID', 'PriorityID', 'ServiceID', 'SLAID', 'SignKeyID', 'CryptKeyID', 'To', 'Cc', 'Bcc', 'StandardTemplateID' [% Data.DynamicFieldNamesStrg %]]);
});
//]]></script>
[% END %]
</div>
<div class="Clear"></div>
[% RenderBlockStart("TicketService") %]
<label for="ServiceID">[% Translate("Service") | html %]:</label>
<div class="Field">
[% Data.ServiceStrg %]
<div id="ServiceIDServerError" class="TooltipErrorMessage"><p>[% Translate("Service invalid.") | html %]</p></div>
[% WRAPPER JSOnDocumentComplete %]
<script type="text/javascript">//<![CDATA[
$('#ServiceID').bind('change', function (Event) {
Core.AJAX.FormUpdate($('#NewPhoneTicket'), 'AJAXUpdate', 'ServiceID', ['TypeID', 'Dest', 'NewUserID', 'NewResponsibleID', 'NextStateID', 'PriorityID', 'SLAID', 'SignKeyID', 'CryptKeyID', 'To', 'Cc', 'Bcc', 'StandardTemplateID' [% Data.DynamicFieldNamesStrg %]]);
});
//]]></script>
[% END %]
</div>
<div class="Clear"></div>
[% RenderBlockEnd("TicketService") %]
[% RenderBlockStart("TicketServiceMandatory") %]
<label class="Mandatory" for="ServiceID"><span class="Marker">*</span> [% Translate("Service") | html %]:</label>
<div class="Field">
[% Data.ServiceStrg %]
<div id="ServiceIDError" class="TooltipErrorMessage" ><p>[% Translate("This field is required.") | html %]</p></div>
<div id="ServiceIDServerError" class="TooltipErrorMessage"><p>[% Translate("Service invalid.") | html %]</p></div>
[% WRAPPER JSOnDocumentComplete %]
<script type="text/javascript">//<![CDATA[
$('#ServiceID').bind('change', function (Event) {
Core.AJAX.FormUpdate($('#NewPhoneTicket'), 'AJAXUpdate', 'ServiceID', ['TypeID', 'Dest', 'NewUserID', 'NewResponsibleID', 'NextStateID', 'PriorityID', 'SLAID', 'SignKeyID', 'CryptKeyID', 'To', 'Cc', 'Bcc', 'StandardTemplateID' [% Data.DynamicFieldNamesStrg %]]);
});
//]]></script>
[% END %]
</div>
<div class="Clear"></div>
[% RenderBlockEnd("TicketServiceMandatory") %]
[% RenderBlockStart("TicketSLA") %]
<label for="SLAID">[% Translate("Service Level Agreement") | html %]:</label>
<div class="Field">
[% Data.SLAStrg %]
[% WRAPPER JSOnDocumentComplete %]
<script type="text/javascript">//<![CDATA[
$('#SLAID').bind('change', function (Event) {
Core.AJAX.FormUpdate($('#NewPhoneTicket'), 'AJAXUpdate', 'SLAID', ['TypeID', 'Dest', 'NewUserID', 'NewResponsibleID', 'ServiceID', 'NextStateID', 'PriorityID', 'SignKeyID', 'CryptKeyID', 'To', 'Cc', 'Bcc', 'StandardTemplateID' [% Data.DynamicFieldNamesStrg %]]);
});
//]]></script>
[% END %]
</div>
<div class="Clear"></div>
[% RenderBlockEnd("TicketSLA") %]
[% RenderBlockStart("TicketSLAMandatory") %]
<label class="Mandatory" for="SLAID"><span class="Marker">*</span> [% Translate("Service Level Agreement") | html %]:</label>
<div class="Field">
[% Data.SLAStrg %]
<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>
[% WRAPPER JSOnDocumentComplete %]
<script type="text/javascript">//<![CDATA[
$('#SLAID').bind('change', function (Event) {
Core.AJAX.FormUpdate($('#NewPhoneTicket'), 'AJAXUpdate', 'SLAID', ['TypeID', 'Dest', 'NewUserID', 'NewResponsibleID', 'ServiceID', 'NextStateID', 'PriorityID', 'SignKeyID', 'CryptKeyID', 'To', 'Cc', 'Bcc', 'StandardTemplateID' [% Data.DynamicFieldNamesStrg %]]);
});
//]]></script>
[% END %]
</div>
<div class="Clear"></div>
[% RenderBlockEnd("TicketSLAMandatory") %]
[% 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>
[% WRAPPER JSOnDocumentComplete %]
<script type="text/javascript">//<![CDATA[
$('#OwnerSelectionGetAll').bind('click', function (Event) {
$('#OwnerAll').val('1'); // Needed? Why?
Core.AJAX.FormUpdate($('#NewPhoneTicket'), 'AJAXUpdate', 'OwnerAll', ['NewUserID'], function() {
$('#NewUserID').focus();
});
return false;
});
$('#NewUserID').bind('change', function (Event) {
Core.AJAX.FormUpdate($('#NewPhoneTicket'), 'AJAXUpdate', 'NewUserID', [ 'TypeID', 'Dest', 'NewResponsibleID', 'NextStateID', 'PriorityID', 'ServiceID', 'SLAID', 'SignKeyID', 'CryptKeyID', 'To', 'Cc', 'Bcc', 'StandardTemplateID' [% Data.DynamicFieldNamesStrg %]]);
});
//]]></script>
[% END %]
</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>
[% WRAPPER JSOnDocumentComplete %]
<script type="text/javascript">//<![CDATA[
$('#ResponsibleSelectionGetAll').bind('click', function (Event) {
$('#ResponsibleAll').val('1'); // Needed? Why?
Core.AJAX.FormUpdate($('#NewPhoneTicket'), 'AJAXUpdate', 'ResponsibleAll', ['NewResponsibleID'], function() {
$('#NewResponsibleID').focus();
});
return false;
});
$('#NewResponsibleID').bind('change', function (Event) {
Core.AJAX.FormUpdate($('#NewPhoneTicket'), 'AJAXUpdate', 'NewResponsibleID', [ 'TypeID', 'Dest', 'NewUserID', 'NextStateID', 'PriorityID', 'ServiceID', 'SLAID', 'SignKeyID', 'CryptKeyID', 'To', 'Cc', 'Bcc', 'StandardTemplateID' [% Data.DynamicFieldNamesStrg %]]);
});
//]]></script>
[% END %]
</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("SpellCheck") %]
<a href="#" id="OptionSpellCheck">[ [% Translate("Spell check") | html %] ]</a>
[% RenderBlockEnd("SpellCheck") %]
[% 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.") %]</p>
</div>
<div class="Clear"></div>
[% WRAPPER JSOnDocumentComplete %]
<script type="text/javascript">//<![CDATA[
$('#StandardTemplateID').bind('change', function (Event) {
Core.Agent.TicketAction.ConfirmTemplateOverwrite('RichText', $(this), function () {
Core.AJAX.FormUpdate($('#NewPhoneTicket'), 'AJAXUpdate', 'StandardTemplateID', ['RichTextField']);
});
return false;
});
//]]></script>
[% END %]
[% RenderBlockEnd("StandardTemplate") %]
<label class="Mandatory" for="RichText"><span class="Marker">*</span> [% Translate("Text") | html %]:</label>
<div id="RichTextField" class="RichTextField">
[% RenderBlockStart("RichText") %]
[% InsertTemplate("RichTextEditor.tt") %]
[% RenderBlockEnd("RichText") %]
<textarea id="RichText" class="RichText Validate_Required [% Data.RichTextInvalid | html %]" name="Body" title="[% Translate("Message body") | html %]" rows="15" cols="[% Config("Ticket::Frontend::TextAreaNote") %]">[% 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("Attachment") | html %]:</label>
<div class="Field">
<ul>
[% RenderBlockStart("Attachment") %]
<li>
[% Data.Filename | html %] ([% Data.Filesize | html %])
<button type="button" id="AttachmentDeleteButton[% Data.FileID | html %]" name="AttachmentDeleteButton[% Data.FileID | html %]" value="[% Translate("Delete") | html %]" class="SpacingLeft">[% Translate("Delete") | html %]</button>
<input type="hidden" id="AttachmentDelete[% Data.FileID | html %]" name="AttachmentDelete[% Data.FileID | html %]" />
[% WRAPPER JSOnDocumentComplete %]
<script type="text/javascript">//<![CDATA[
$('#AttachmentDeleteButton[% Data.FileID | html %]').bind('click', function () {
var $Form = $('#AttachmentDeleteButton[% Data.FileID | html %]').closest('form');
$('#AttachmentDelete[% Data.FileID | html %]').val(1);
Core.Form.Validate.DisableValidation($Form);
$Form.trigger('submit');
});
//]]></script>
[% END %]
</li>
[% RenderBlockEnd("Attachment") %]
<li>
<input id="FileUpload" name="FileUpload" type="file" size="40" />
<input type="hidden" id="AttachmentUpload" name="AttachmentUpload" value="0" />
</li>
</ul>
[% WRAPPER JSOnDocumentComplete %]
<script type="text/javascript">//<![CDATA[
$('#FileUpload').bind('change', function () {
var $Form = $('#FileUpload').closest('form');
Core.Form.Validate.DisableValidation($Form);
$Form.find('#AttachmentUpload').val('1').end().submit();
});
//]]></script>
[% END %]
</div>
<div class="Clear"></div>
[% RenderBlockStart("ChatArticlePreview") %]
<label>[% Translate("Chat protocol") | html %]:</label>
<div class="Field">
<div class="ChatProtocol">
[% INCLUDE "ChatDisplay.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 %]
[% WRAPPER JSOnDocumentComplete %]
<script type="text/javascript">//<![CDATA[
$('#NextStateID').bind('change', function (Event) {
Core.AJAX.FormUpdate($('#NewPhoneTicket'), 'AJAXUpdate', 'NextStateID', [ 'TypeID', 'Dest', 'NewUserID','NewResponsibleID', 'PriorityID', 'ServiceID', 'SLAID', 'SignKeyID', 'CryptKeyID', 'To', 'Cc', 'Bcc', 'StandardTemplateID' [% Data.DynamicFieldNamesStrg %]]);
});
//]]></script>
[% END %]
</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 %]
[% WRAPPER JSOnDocumentComplete %]
<script type="text/javascript">//<![CDATA[
$('#PriorityID').bind('change', function (Event) {
Core.AJAX.FormUpdate($('#NewPhoneTicket'), 'AJAXUpdate', 'PriorityID', [ 'TypeID', 'Dest', 'NewUserID','NewResponsibleID', 'NextStateID', 'ServiceID', 'SLAID', 'SignKeyID', 'CryptKeyID', 'To', 'Cc', 'Bcc', 'StandardTemplateID' [% Data.DynamicFieldNamesStrg %]]);
});
//]]></script>
[% END %]
</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>
[% WRAPPER JSOnDocumentComplete %]
<script type="text/javascript">//<![CDATA[
Core.Agent.TicketAction.Init();
Core.Config.Set('Localization.Delete', [% Translate("Delete") | JSON %]);
//]]></script>
[% END %]
# 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>
|