File: AgentTicketPhoneNew.dtl

package info (click to toggle)
otrs2 2.0.4p01-18
  • links: PTS
  • area: main
  • in suites: etch
  • size: 7,900 kB
  • ctags: 4,437
  • sloc: perl: 81,607; xml: 8,135; sql: 8,013; sh: 1,113; makefile: 22; php: 16
file content (289 lines) | stat: -rw-r--r-- 12,350 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
# --
# AgentPhoneNew.dtl - provides HTML form for phone
# Copyright (C) 2001-2005 Martin Edenhofer <martin+code@otrs.org>
# --
# $Id: AgentTicketPhoneNew.dtl,v 1.14 2005/08/17 15:09:05 rk Exp $
# --
# 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 http://www.gnu.org/licenses/gpl.txt.
# --
<!-- start form -->
<script language="JavaScript" type="text/javascript">
<!--
function submit_compose()
{
    if (document.compose.Subject.value == "") {
        alert('$Text{"A message should have a subject!"}');
        document.compose.Subject.focus();
        return false;
    }
    else if (document.compose.Body.value == "") {
        alert('$Text{"A message should have a body!"}');
        document.compose.Body.focus();
        return false;
    }
    else if (isNaN(document.compose.Day.value) || isNaN(document.compose.Month.value) || isNaN(document.compose.Year.value) || isNaN(document.compose.Hour.value) || isNaN(document.compose.Minute.value)) {
        alert('$Text{"Invalid date!"}');
        return false;
    }
    else if (document.compose.Day.value < 1 || document.compose.Day.value > 31 || document.compose.Month.value < 1 || document.compose.Month.value > 31 || document.compose.Year.value < 999 || document.compose.Year.value > 10000 || document.compose.Hour.value < 0 || document.compose.Hour.value > 23 ||document.compose.Minute.value < 0 || document.compose.Minute.value > 59  ) {
        alert('$Text{"Invalid date!"}');
        return false;
    }
<!-- dtl:block:TimeUnitsJs -->
    else if (document.compose.TimeUnits.value != "") {
        var reg = /^-{0,1}\d+?((\.|,){0,1}\d+?){0,1}$/;
        if (reg.test(document.compose.TimeUnits.value) == false) {
            alert('$Text{"Invalid time!"}');
            document.compose.TimeUnits.focus();
            return false;
        }
    }
    else if (document.compose.TimeUnits.value == "" && $Config{"Ticket::Frontend::NeedAccountedTime"}) {
        alert('$Text{"You need to account time!"}');
        document.compose.TimeUnits.focus();
        return false;
    }
<!-- dtl:block:TimeUnitsJs -->
    else {
        return true;
    }
}
//-->
</script>

<script language="JavaScript" type="text/javascript">
<!--
function SpellCheckSubmit()
{
    document.spelling.Body.value = document.compose.Body.value;
    window.open('', 'spelling', 'toolbar=no,location=no,status=yes,scrollbars=yes,resizable=yes,width=700,height=550,left=100,top=100');
    document.spelling.submit()
}
// -->
</script>

<script language="JavaScript" type="text/javascript">
<!--
function FAQSubmit()
{
    window.open('', 'faq', 'toolbar=no,location=no,status=yes,scrollbars=yes,resizable=yes,width=700,height=550,left=100,top=100');
    document.faq.submit()
}
// -->
</script>

<script language="JavaScript" type="text/javascript">
<!--
function CustomerSubmit()
{
    window.open('', 'customer', 'toolbar=no,location=no,status=yes,scrollbars=yes,resizable=yes,width=700,height=550,left=100,top=100');
    document.customer.submit()
}
// -->
</script>

<script language="JavaScript" type="text/javascript">
<!--
function clear_field()
{
    document.compose.From.value = "";
    document.compose.From.focus();
}
//-->
</script>

<table border="0" width="100%" cellspacing="0" cellpadding="3">
<tr>
  <td class="mainhead">
    $Env{"Box0"}$Text{"Phone call"} / $Text{"new ticket"}$Env{"Box1"}
  </td>
</tr>
<tr>
  <td class="mainbody">

#<form action="$Env{"CGIHandle"}" method="post" enctype="multipart/form-data">
#<input type="hidden" name="Action" value="$Env{"Action"}">
#<input type="hidden" name="Subaction" value="StoreNew">
#<input type="hidden" name="FormID" value="$QData{"FormID"}">
#<input type="hidden" name="ExpandCustomerName" value="2">
#<input type="hidden" name="Subject" value="Example Subject">
#<input type="hidden" name="Body" value="Name:
#Product:
#Comment:">
#<input type="submit" name="" value="Example Template">
#</form>
#<hr>

<form action="$Env{"CGIHandle"}" method="post" enctype="multipart/form-data" name="compose">
<input type="hidden" name="Action" value="$Env{"Action"}">
<input type="hidden" name="Subaction" value="StoreNew">
<input type="hidden" name="FormID" value="$QData{"FormID"}">
<input type="hidden" name="ExpandCustomerName" value="0">
<input type="hidden" name="AllUsers" value="0">
<input type="hidden" name="PreSelectedCustomerUser" value="">
<input type="hidden" name="SelectedCustomerUser" value="$Data{"CustomerUser"}">
<input type="hidden" name="TicketID" value="$Data{"TicketID"}">
  <table border="0" width="100%">
  <tr>
    <td width="20%" class="contentkey">$Text{"From"}:</td>
    <td width="60%" class="contentvalue"><input type="text" name="From" value="$Data{"From"}" size="70"> <font color="red" size="-2">$Text{"$Data{"From invalid"}"}</font><br>
    $Data{"CustomerUserStrg"}
<dtl if ($Data{"CustomerUserStrg"} ne "") { $Data{"TakeThisCustomer"} = "<br><input type="submit" name="ExpandCustomerName2" value="$Text{"Take this Customer"}">"; }>
    $Data{"TakeThisCustomer"}
    <input type="submit" name="ExpandCustomerName1" value="$Text{"Search Customer"}">
    <input type="submit" name="" value="$Text{"Clear From"}" onclick="javascript:clear_field(); return false;">
    </td>
    <td width="20%" rowspan="10" class="contentkey">
# show customer info table
<!-- dtl:block:CustomerTable -->
    <p align="left"><b>$Text{"Customer Info"}</b>:<br>$Data{"CustomerTable"}</p>
<!-- dtl:block:CustomerTable -->
# --
#$Text{"FAQ-Search"}: $Env{"Box0"}<a href="" onclick="FAQSubmit(); return false;" onmouseout="window.status='';" onmouseover="window.status='$Text{"Insert"}'; return true;">$Text{"Insert"}</a>$Env{"Box1"}
#<input type="text" name="FAQ" value="" onSubmit="document.compose.ExpandCustomerName.value='4';">

  </td>
  </tr>
  <tr>
    <td class="contentkey">$Text{"To"}:</td>
    <td class="contentvalue">$Data{"ToStrg"} <font color="red" size="-2">$Text{"$Data{"Destination invalid"}"}</font></td>
  </td>
  </tr>
<!-- dtl:block:OwnerSelection -->
  <tr>
    <td class="contentkey">$Text{"Owner"}:</td>
    <td class="contentvalue">$Data{"OptionStrg"} $Env{"Box0"}<a href="" onclick="document.compose.ExpandCustomerName.value='3'; document.compose.AllUsers.value='1'; document.compose.submit(); return false;" onmouseout="window.status='';" onmouseover="window.status='$Text{"All Agents"}'; return true;">$Text{"All"}</a>$Env{"Box1"}</td>
  </tr>
<!-- dtl:block:OwnerSelection -->
  <tr>
    <td class="contentkey">$Text{"Subject"}:</td>
    <td class="contentvalue"><input type="text" name="Subject" value="$Data{"Subject"}" size="70"> <font color="red" size="-2">$Text{"$Data{"Subject invalid"}"}</font></td>
  </tr>
  <tr>
    <td class="contentkey">$Text{"Options"}:</td>
    <td class="contentvalue">
<!-- dtl:block:SpellCheck -->
       $Env{"Box0"}<a href="" onclick="SpellCheckSubmit(); return false;" onmouseover="window.status='$Text{"Spell Check"}'; return true;" onmouseout="window.status='';"><img border="0" src="$Env{"Images"}spell.png">$Text{"Spell Check"}</a>$Env{"Box1"}
<!-- dtl:block:SpellCheck -->
       $Env{"Box0"}<a href="#attachment" onmouseover="window.status='$Text{"Attachments"}'; return true;" onmouseout="window.status='';"><img border="0" src="$Env{"Images"}attach.png">$Text{"Attachments"}</a>$Env{"Box1"}
# --
# check if the faq link should be shown
# --
<dtl if ($Env{"UserIsGroupRo[faq]"} eq "Yes") { $Data{"FAQLink"} = "$Env{"Box0"}<a href="" onclick="FAQSubmit(); return false;" onmouseover="window.status='$Text{"FAQ"}'; return true;" onmouseout="window.status='';"><img border="0" src="$Env{"Images"}help-small.png">$Text{"FAQ"}</a>$Env{"Box1"}"; }>
        $Data{"FAQLink"}
       $Env{"Box0"}<a href="" onclick="CustomerSubmit(); return false;" onmouseover="window.status='$Text{"Customer"}'; return true;" onmouseout="window.status='';"><img border="0" src="$Env{"Images"}group-small.png">$Text{"Customer"}</a>$Env{"Box1"}
    </td>
  </tr>
  <tr>
    <td class="contentkey">$Text{"Text"}:</td>
    <td class="contentvalue">
    <textarea name="Body" rows="15" cols="$Config{"Ticket::Frontend::TextAreaNote"}">$Data{"Body"}</textarea>
    </td>
  </tr>
  <tr>
    <td class="contentkey">$Text{"Attachment"}:</td>
    <td class="contentvalue">
     <table cellspacing="0" cellpadding="0" width="400">
<!-- dtl:block:Attachment -->
       <tr><td>$QData{"Filename"}</td><td>$QData{"Filesize"}</td><td align="right"><input type="submit" name="AttachmentDelete$QData{"FileID"}" value="$Text{"Delete"}"></td></tr>
<!-- dtl:block:Attachment -->
      <tr><td colspan="2">
       <input name="file_upload" type="file" size="40" class="fixed"></td><td align="right"><input type="submit" name="AttachmentUpload" value="$Text{"Attach"}"><a name="attachment">
       </td></tr>
       </table>
    </td>
  </tr>
  <tr>
    <td class="contentkey">$Text{"CustomerID"}:</td>
    <td class="contentvalue"> <input type="text" name="CustomerID" value="$Data{"CustomerID"}" size="25"></td>
  </tr>
  <tr>
    <td class="contentkey">$Text{"Next ticket state"}:</td>
    <td class="contentvalue"> $Data{"NextStatesStrg"}</td>
  </tr>
  <tr>
    <td class="contentkey">$Text{"Pending Date"} ($Text{"for pending* states"}):</td>
    <td class="contentvalue">$Data{"PendingDateString"} <font color="red" size="-2">$Text{"$Data{"Date invalid"}"}</font></td>
  </tr>
  <tr>
    <td class="contentkey">$Text{"Priority"}:</td>
    <td class="contentvalue"> $Data{"PriorityStrg"}</td>
  </tr>
#  <tr>
#    <td class="contentkey">$Data{"TicketFreeKeyField1"}:</td>
#    <td class="contentvalue">$Data{"TicketFreeTextField1"}</td>
#  </tr>
#  <tr>
#    <td class="contentkey">$Data{"TicketFreeKeyField2"}:</td>
#    <td class="contentvalue">$Data{"TicketFreeTextField2"}</td>
#  </tr>
#  <tr>
#    <td class="contentkey">$Data{"TicketFreeKeyField3"}:</td>
#    <td class="contentvalue">$Data{"TicketFreeTextField3"}</td>
#  </tr>
#  <tr>
#    <td class="contentkey">$Data{"TicketFreeKeyField4"}:</td>
#    <td class="contentvalue">$Data{"TicketFreeTextField4"}</td>
#  </tr>
#  <tr>
#    <td class="contentkey">$Data{"TicketFreeKeyField5"}:</td>
#    <td class="contentvalue">$Data{"TicketFreeTextField5"}</td>
#  </tr>
#  <tr>
#    <td class="contentkey">$Data{"TicketFreeKeyField6"}:</td>
#    <td class="contentvalue">$Data{"TicketFreeTextField6"}</td>
#  </tr>
#  <tr>
#    <td class="contentkey">$Data{"TicketFreeKeyField7"}:</td>
#    <td class="contentvalue">$Data{"TicketFreeTextField7"}</td>
#  </tr>
#  <tr>
#    <td class="contentkey">$Data{"TicketFreeKeyField8"}:</td>
#    <td class="contentvalue">$Data{"TicketFreeTextField8"}</td>
#  </tr>
#  <tr>
#    <td class="contentkey">$Text{"$Config{"TicketFreeTimeKey1"}"}:</td>
#    <td class="contentvalue">$Data{"TicketFreeTime1"}</td>
#  </tr>
#  <tr>
#    <td class="contentkey">$Text{"$Config{"TicketFreeTimeKey2"}"}:</td>
#    <td class="contentvalue">$Data{"TicketFreeTime2"}</td>
#  </tr>
<!-- dtl:block:TimeUnits -->
  <tr>
    <td class="contentkey">$Text{"Time units"}$Text{"$Config{"Ticket::Frontend::TimeUnits"}"}:</td>
    <td class="contentvalue"> <input type="text" name="TimeUnits" value="$Data{"TimeUnits"}" size="3"></td>
  </tr>
<!-- dtl:block:TimeUnits -->
  </table>
<br>
<input class="button" accesskey="g" type="submit" name="Create" value="$Text{"create"}" onclick="return submit_compose();">
</form>

<form action="$Env{"CGIHandle"}" method="post" name="spelling" target="spelling">
  <input type="hidden" name="Action" value="AgentSpelling">
  <input type="hidden" name="Body" value="">
  <input type="hidden" name="spell_lang" value="">
</form>

<form action="$Env{"CGIHandle"}" method="post" name="faq" target="faq">
  <input type="hidden" name="Action" value="FAQ">
  <input type="hidden" name="Nav" value="None">
  <input type="hidden" name="Body" value="">
  <input type="hidden" name="Subject" value="">
  <input type="hidden" name="What" value="">
</form>

<form action="$Env{"CGIHandle"}" method="post" name="customer" target="customer">
  <input type="hidden" name="Action" value="AdminCustomerUser">
  <input type="hidden" name="Nav" value="None">
  <input type="hidden" name="Subject" value="">
  <input type="hidden" name="What" value="">
</form>

  </td>
</tr>
</table>
<!-- end form -->