File: AgentTicketMove.tt

package info (click to toggle)
otrs2 5.0.16-1%2Bdeb9u6
  • links: PTS
  • area: non-free
  • in suites: stretch
  • size: 141,108 kB
  • sloc: perl: 746,356; xml: 54,469; sql: 10,505; sh: 430; makefile: 64
file content (342 lines) | stat: -rw-r--r-- 17,912 bytes parent folder | download | duplicates (2)
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
# --
# 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.
# --

<form action="[% Env("CGIHandle") %]" method="post" enctype="multipart/form-data" name="MoveTicketToQueue" class="Validate PreventMultipleSubmits" id="MoveTicketToQueue">
    <input type="hidden" name="Action"       value="[% Env("Action") %]"/>
    <input type="hidden" name="Subaction"    value="MoveTicket"/>
    <input type="hidden" name="FormID"       value="[% Data.FormID | html %]"/>
    <input type="hidden" name="TicketID"     value="[% Data.TicketID | html %]"/>
    <input type="hidden" name="TicketUnlock" value="[% Data.TicketUnlock | html %]"/>
    <input type="hidden" name="OwnerAll" id="OwnerAll" value="[% Data.OwnerAll | html %]"/>
    <input type="hidden" name="NoSubmit"     value=""/>

    <div class="LayoutPopup ARIARoleMain">
        <div class="Header">
            <h1>[% Translate("Move %s%s%s", Config('Ticket::Hook'), Config('Ticket::HookDivider'), Data.TicketNumber) | html %] &mdash; [% Data.Title | html %]</h1>
            <p class="AsteriskExplanation">[% Translate("All fields marked with an asterisk (*) are mandatory.") | html %]</p>

[% RenderBlockStart("TicketBack") %]
            <p>
                <a class="CancelClosePopup" href="#">[% Translate("Cancel & close") | html %]</a>
            </p>
[% RenderBlockEnd("TicketBack") %]
[% RenderBlockStart("PropertiesLock") %]
            <p>
                [% Translate("The ticket has been locked") | html %].
                <a class="UndoClosePopup" href="[% Env("Baselink") %]Action=AgentTicketLock;Subaction=Unlock;TicketID=[% Data.TicketID | uri %];[% Env("ChallengeTokenParam") | html %]">
                    [% Translate("Undo & close") | html %]
                </a>
            </p>
[% RenderBlockEnd("PropertiesLock") %]


        </div>
        <div class="Content">
            <div class="WidgetSimple Expanded">
                <div class="Header">
                    <div class="WidgetAction Toggle">
                        <a href="#" title="[% Translate("Toggle this widget") | html %]"><i class="fa fa-caret-right"></i><i class="fa fa-caret-down"></i></a>
                    </div>
                    <h2>[% Translate("Ticket Settings") | html %]</h2>
                </div>
                <div class="Content">
                    <fieldset class="TableLike FixedLabel">

[% RenderBlockStart("Queue") %]
                        <label class="Mandatory" for="DestQueueID"><span class="Marker">*</span> [% Translate("New Queue") | html %]:</label>
                        <div class="Field">
                            [% Data.MoveQueuesStrg %]
                            <div id="DestQueueIDError" class="TooltipErrorMessage" ><p>[% Translate("This field is required.") | html %]</p></div>
                            <div id="DestQueueIDServerError" class="TooltipErrorMessage"><p>[% Translate("This field is required.") | html %]</p></div>
[% WRAPPER JSOnDocumentComplete %]
<script type="text/javascript">//<![CDATA[
    $('#DestQueueID').bind('change', function (Event) {
        $('#NoSubmit').val('1');
        Core.AJAX.FormUpdate($('#MoveTicketToQueue'), 'AJAXUpdate', 'DestQueueID', ['NewUserID', 'NewStateID', 'NewPriorityID', 'StandardTemplateID' [% Data.DynamicFieldNamesStrg %]]);
    });
//]]></script>
[% END %]
                        </div>
                        <div class="Clear"></div>
[% RenderBlockEnd("Queue") %]

[% RenderBlockStart("Owner") %]
                        <label for="NewUserID">[% Translate("New Owner") | html %]:</label>
                        <div class="Field">
                            [% Data.OwnerStrg %]
                            <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');
        Core.AJAX.FormUpdate($('#MoveTicketToQueue'), 'AJAXUpdate', 'OwnerAll', ['NewUserID'], function() {
            $('#NewUserID').focus();
        });
        return false;
    });

    $('#NewUserID').bind('change', function (Event) {
        Core.AJAX.FormUpdate($('#MoveTicketToQueue'), 'AJAXUpdate', 'NewUserID', ['DestQueueID', 'NewStateID', 'NewPriorityID' [% Data.DynamicFieldNamesStrg %]]);
    });
//]]></script>
[% END %]

                        </div>
                        <div class="Clear"></div>
[% RenderBlockEnd("Owner") %]

[% RenderBlockStart("State") %]
                        <label for="NewStateID">[% Translate("Next ticket state") | html %]:</label>
                        <div class="Field">
                            [% Data.NextStatesStrg %]
[% WRAPPER JSOnDocumentComplete %]
<script type="text/javascript">//<![CDATA[
    $('#NewStateID').bind('change', function (Event) {
        Core.AJAX.FormUpdate($('#MoveTicketToQueue'), 'AJAXUpdate', 'NewStateID', ['DestQueueID', 'NewUserID', 'NewPriorityID' [% Data.DynamicFieldNamesStrg %]]);
    });
//]]></script>
[% END %]
                        </div>
                        <div class="Clear"></div>

[% RenderBlockStart("StatePending") %]
                        <label>[% Translate("Pending date") | html %]:</label>
                        <div class="Field">
                            [% Data.DateString %]
                            <div id="DayServerError" class="TooltipErrorMessage"><p>[% Translate("Date invalid!") | html %]</p></div>
                            <div id="HourServerError" class="TooltipErrorMessage"><p>[% Translate("Date invalid!") | html %]</p></div>
                            <p class="FieldExplanation">[% Translate("For all pending* states.") | html %]</p>
                        </div>
                        <div class="Clear"></div>
[% RenderBlockEnd("StatePending") %]
[% RenderBlockEnd("State") %]

[% RenderBlockStart("Priority") %]
                        <label for="NewPriorityID">[% Translate("Priority") | html %]:</label>
                        <div class="Field">
                            [% Data.NextPrioritiesStrg %]
[% WRAPPER JSOnDocumentComplete %]
<script type="text/javascript">//<![CDATA[
    $('#NewPriorityID').bind('change', function (Event) {
        Core.AJAX.FormUpdate($('#MoveTicketToQueue'), 'AJAXUpdate', 'NewStateID', ['DestQueueID', 'NewUserID', 'NewStateID' [% Data.DynamicFieldNamesStrg %]]);
    });
//]]></script>
[% END %]
                        </div>
                        <div class="Clear"></div>
[% RenderBlockEnd("Priority") %]
                    </fieldset>
                </div>
            </div>
[% RenderBlockStart("WidgetDynamicFields") %]
            <div class="WidgetSimple Expanded">
                <div class="Header">
                    <div class="WidgetAction Toggle">
                        <a href="#" title="[% Translate("Toggle this widget") | html %]"><i class="fa fa-caret-right"></i><i class="fa fa-caret-down"></i></a>
                    </div>
                    <h2>[% Translate("Dynamic Fields") | html %]</h2>
                </div>
                <div class="Content">
                    <fieldset class="TableLike FixedLabel">

[% 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") %]

                    </fieldset>
                </div>
            </div>
[% RenderBlockEnd("WidgetDynamicFields") %]

[% RenderBlockStart("WidgetArticle") %]
            <div class="WidgetSimple [% Data.WidgetStatus | html %]" id="WidgetArticle">
                <div class="Header">
                    <div class="WidgetAction Toggle">
                        <a href="#" title="[% Translate("Toggle this widget") | html %]"><i class="fa fa-caret-right"></i><i class="fa fa-caret-down"></i></a>
                    </div>
                    <h2>[% Translate("Add Article") | html %]</h2>
                </div>
                <div class="Content">
                    <fieldset class="TableLike FixedLabel">
[% IF Data.WidgetStatus == 'Expanded' %]
                        <input type="hidden" id="CreateArticle" name="CreateArticle" value="1" />
[% ELSE %]
                        <label for="CreateArticle">[% Translate("Create an Article") | html %]:</label>
                        <div class="Field">
                            <input type="checkbox" id="CreateArticle" name="CreateArticle" value="1" />
                        </div>
                        <div class="Clear"></div>
[% END %]
[% RenderBlockStart("Note") %]
[% RenderBlockStart("SubjectLabel") %]
                        <label for="Subject">[% Translate("Subject") | html %]:</label>
[% RenderBlockEnd("SubjectLabel") %]
[% RenderBlockStart("SubjectLabelMandatory") %]
                        <label class="Mandatory" for="Subject"><span class="Marker">*</span>[% Translate("Subject") | html %]:</label>
[% RenderBlockEnd("SubjectLabelMandatory") %]
                        <div class="Field">
                            <input type="text" id="Subject" name="Subject" value="[% Data.Subject | html %]" class="Validate Validate_DependingRequiredAND Validate_Depending_CreateArticle [% Data.SubjectRequired %] [% Data.SubjectInvalid %] W75pc"/>
                            <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") %]

<!-- 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($('#MoveTicketToQueue'), 'AJAXUpdate', 'StandardTemplateID', ['RichTextField']);
        });
        return false;
    });
//]]></script>
[% END %]
[% RenderBlockEnd("StandardTemplate") %]

[% RenderBlockStart("RichTextLabel") %]
                        <label for="RichText">[% Translate("Text") | html %]:</label>
[% RenderBlockEnd("RichTextLabel") %]
[% RenderBlockStart("RichTextLabelMandatory") %]
                        <label class="Mandatory" for="RichText"><span class="Marker">*</span>[% Translate("Text") | html %]:</label>
[% RenderBlockEnd("RichTextLabelMandatory") %]

[% RenderBlockStart("RichText") %]
[% InsertTemplate("RichTextEditor.tt") %]
[% RenderBlockEnd("RichText") %]

                        <div id="RichTextField" class="RichTextField">
                            <textarea id="RichText" class="RichText Validate [% Data.BodyRequired %] [% Data.BodyInvalid %]" name="Body" 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>
[% RenderBlockEnd("Note") %]
[% 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" name="TimeUnits" id="TimeUnits" value="[% Data.TimeUnits | html %]" class="W50pc Validate_TimeUnits [% Data.TimeUnitsRequired | html %] [% Data.TimeUnitsInvalid | 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") %]
                    </fieldset>
                </div>
            </div>
[% RenderBlockEnd("WidgetArticle") %]

        </div>
        <div class="Footer">
            <button class="CallForAction Primary" id="submitRichText" accesskey="g" title="[% Translate("Submit") | html %] (g)" type="submit" value="[% Translate("Submit") | html %]"><span>[% Translate("Submit") | html %]</span></button>
        </div>
    </div>
</form>

#Layers
[% WRAPPER JSOnDocumentComplete %]
<script type="text/javascript">//<![CDATA[
    Core.Config.Set('Localization.Delete', '[% Translate("Delete") | html %]');
    Core.Agent.TicketAction.Init();
//]]></script>
[% END %]