Vertretermodus: Immer bisherigen Vertreter anzeigen & nur wahlweise ändern
[kivitendo-erp.git] / templates / webpages / ct / form_header.html
1 [%- USE T8 %]
2 [% USE HTML %][% USE LxERP %]
3 <body onLoad="fokus()">
4
5  <div class="listtop">[% title %]</div>
6
7  <form method="post" name="ct" action="ct.pl" onKeyUp="highlight(event)" onClick="highlight(event)">
8
9   <ul id="maintab" class="shadetabs">
10    <li class="selected"><a href="#" rel="billing">[% 'Billing Address' | $T8 %]</a></li>
11    <li><a href="#" rel="shipto">[% 'Shipping Address' | $T8 %]</a></li>
12    <li><a href="#" rel="contacts">Ansprechpartner</a></li>
13    <li><a href="#" rel="deliveries">[% 'Lieferungen' | $T8 %]</a></li>
14    <li><a href="#" rel="vcnotes">[% 'Notes' | $T8 %]</a></li>
15    [%- IF CUSTOM_VARIABLES.size %]
16    <li><a href="#" rel="custom_variables">[% 'Custom Variables' | $T8 %]</a></li>
17    [%- END %]
18   </ul>
19
20   <div class="tabcontentstyle">
21
22    <div id="billing" class="tabcontent">
23
24     <table width="100%">
25      <tr height="5"></tr>
26      [% IF conf_vertreter %]
27       <tr>
28        <th align="right">[% IF is_customer %][% 'Type of Customer' | $T8 %][%- ELSE %][% 'Type of Vendor' | $T8 %][%- END %]</th>
29        <td>
30         [%- INCLUDE generic/multibox.html
31               name       = 'business',
32               DATA       = all_business,
33               show_empty = 1,
34               id_key     = 'id',
35               label_key  = 'description',
36         -%]
37        </td>
38       </tr>
39       [%- IF id %]
40       <tr>
41        <th align="right">[% 'Representative' | $T8 %]</th>
42        <td>
43         <input type="hidden" name="salesman_id" value="[%- HTML.escape(salesman_id) %]"%>
44         [%- HTML.escape(salesman) %]
45        </td>
46       </tr>
47       [%- END %]
48       <tr>
49        <th align="right">
50         [%- IF !id %]
51          [% 'Representative' | $T8 %]
52         [%- ELSE %]
53          [% 'Change representative to' | $T8 %]
54         [%- END %]
55        </th>
56        <td>
57         [%- INCLUDE generic/multibox.html
58               name       = 'new_salesman_id',
59               DATA       = ALL_SALESMAN_CUSTOMERS,
60               id_key     = 'id',
61               label_key  = 'name',
62               show_empty = id,
63         -%]
64        </td>
65       </tr>
66      [%- END %]
67      <tr>
68       [%- IF is_customer %]
69       <th align="right" nowrap>[% 'Customer Number' | $T8 %]</th>
70       <td><input name="customernumber" size="35" value="[% HTML.escape(customernumber) %]"></td>
71       [%- ELSE %]
72       <th align="right" nowrap>[% 'Vendor Number' | $T8 %]</th>
73       <td><input name="vendornumber" size="35" value="[% HTML.escape(vendornumber) %]"></td>
74       [%- END %]
75      </tr>
76
77      <tr>
78       <th align="right" nowrap>[% 'Greeting' | $T8 %]</th>
79       <td>
80        <input id="greeting" name="greeting" size="30" value="[% HTML.escape(greeting) %]">&nbsp;
81        [%- INCLUDE generic/multibox.html
82              name       = 'selected_company_greeting',
83              DATA       = MB_COMPANY_GREETINGS,
84              show_empty = 1,
85              id_key     = 'id',
86              label_key  = 'description',
87        -%]
88       </td>
89      </tr>
90
91      <tr>
92       <th align="right" nowrap>[% IF is_customer %][% 'Customer Name' | $T8 %][%- ELSE %][% 'Vendor Name' | $T8 %][%- END %]</th>
93       <td><input name="name" size="35" maxlength="75" value="[% HTML.escape(name) %]"></td>
94      </tr>
95
96      <tr>
97       <th align="right" nowrap>[% 'Department' | $T8 %]</th>
98       <td>
99        <input name="department_1" size="16" maxlength="75" value="[% HTML.escape(department_1) %]">
100        <input name="department_2" size="16" maxlength="75" value="[% HTML.escape(department_2) %]">
101       </td>
102      </tr>
103
104      <tr>
105       <th align="right" nowrap>[% 'Street' | $T8 %]</th>
106       <td><input name="street" size="35" maxlength="75" value="[% HTML.escape(street) %]"></td>
107      </tr>
108
109      <tr>
110       <th align="right" nowrap>[% 'Zipcode' | $T8 %]/[% 'City' | $T8 %]</th>
111       <td>
112        <input name="zipcode" size="5" maxlength="10" value="[% HTML.escape(zipcode) %]">
113        <input name="city" size="30" maxlength="75" value="[% HTML.escape(city) %]">
114       </td>
115      </tr>
116
117      <tr>
118       <th align="right" nowrap>[% 'Country' | $T8 %]</th>
119       <td><input name="country" size="35" maxlength="75" value="[% HTML.escape(country) %]"></td>
120      </tr>
121
122      <tr>
123       <th align="right" nowrap>[% 'Contact' | $T8 %]</th>
124       <td><input name="contact" size="28" maxlength="75" value="[% HTML.escape(contact) %]"></td>
125      </tr>
126
127      <tr>
128       <th align="right" nowrap>[% 'Phone' | $T8 %]</th>
129       <td><input name="phone" size="30" maxlength="30" value="[% HTML.escape(phone) %]"></td>
130      </tr>
131
132      <tr>
133       <th align="right" nowrap>[% 'Fax' | $T8 %]</th>
134       <td><input name="fax" size="30" maxlength="30" value="[% HTML.escape(fax) %]"></td>
135      </tr>
136
137      <tr>
138       <th align="right" nowrap>[% 'E-mail' | $T8 %]</th>
139       <td><input name="email" size="45" value="[% HTML.escape(email) %]"></td>
140      </tr>
141
142      <tr>
143       <th align="right" nowrap>[% 'Homepage' | $T8 %]</th>
144       <td><input name="homepage" size="45" value="[% HTML.escape(homepage) %]"></td>
145      </tr>
146     </table>
147
148     <table>
149      <tr>
150       <th align="right">[% 'Credit Limit' | $T8 %]</th>
151       <td><input name="creditlimit" size="9" value="[% LxERP.format_amount(creditlimit, 0) %]"></td>
152       <input type="hidden" name="terms" value="[% HTML.escape(terms) %]">
153       <th align="right">[% 'Payment Terms' | $T8 %]</th>
154       <td>
155        [%- INCLUDE generic/multibox.html
156              name       = 'payment_id',
157              DATA       = payment_terms,
158              show_empty = 1,
159              id_key     = 'id',
160              label_key  = 'description',
161        -%]
162       </td>
163
164       <th align="right">[% 'Discount' | $T8 %]</th>
165       <td><input name="discount" size="4" value="[% LxERP.format_amount(discount) %]"> %</td>
166      </tr>
167
168      <tr>
169       <th align="right">[% 'Tax Number / SSN' | $T8 %]</th>
170       <td><input name="taxnumber" size="20" value="[% HTML.escape(taxnumber) %]"></td>
171       <!-- Anm.: R&B 15.11.2008     VAT Reg No ist Ust-ID in GB, aber generell sollte es laut Richardson die sales tax id sein -->
172       <th align="right">[% 'sales tax identification number' | $T8 %]</th>
173       <td><input name="ustid" maxlength="14" size="20" value="[% HTML.escape(ustid) %]"></td>
174       [%- IF is_customer %]
175       <th align="right">[% 'our vendor number at customer' | $T8 %]</th>
176       <td><input name="c_vendor_id" size="10" value="[% HTML.escape(c_vendor_id) %]"></td>
177       [%- ELSE %]
178       <th align="right">[% 'Customer Number' | $T8 %]</th>
179       <td><input name="v_customer_id" size="10" value="[% HTML.escape(v_customer_id) %]"></td>
180       [%- END %]
181      </tr>
182
183      <tr>
184       <th align="right">[% 'Account Number' | $T8 %]</th>
185       <td><input name="account_number" size="10" maxlength="100" value="[% HTML.escape(account_number) %]"></td>
186       <th align="right">[% 'Bank Code Number' | $T8 %]</th>
187       <td><input name="bank_code" size="10" maxlength="100" value="[% HTML.escape(bank_code) %]"></td>
188       <th align="right">[% 'Bank' | $T8 %]</th>
189       <td><input name="bank" size="20" value="[% HTML.escape(bank) %]"></td>
190      </tr>
191
192      <tr>
193       <th align="right">[% 'IBAN' | $T8 %]</th>
194       <td><input name="iban" size="10" maxlength="100" value="[% HTML.escape(iban) %]"></td>
195       <th align="right">[% 'BIC' | $T8 %]</th>
196       <td><input name="bic" size="10" maxlength="100" value="[% HTML.escape(bic) %]"></td>
197      </tr>
198
199      [%- IF conf_vertreter %]
200       <tr>
201        <th align="right">[% 'Username' | $T8 %]</th>
202        <td><input name="username" maxlength="50" value="[% HTML.escape(username) %]"></td>
203        <th align="right">[% 'Password' | $T8 %]</th>
204        <td><input name="user_password" value="[% HTML.escape(user_password) %]"></td>
205       </tr>
206      [%- END %]
207
208      <tr>
209       [% UNLESS conf_vertreter %]
210        <th align="right">[% IF is_customer %][% 'Type of Customer' | $T8 %][% ELSE %][% 'Type of Vendor' | $T8 %][%- END %]</th>
211        <td>
212         [%- INCLUDE generic/multibox.html
213               name       = 'business',
214               DATA       = all_business,
215               show_empty = 1,
216               id_key     = 'id',
217               label_key  = 'description',
218         -%]
219        </td>
220       [%- END %]
221       <th align="right">[% 'Language' | $T8 %]</th>
222       <td>
223        [%- INCLUDE generic/multibox.html
224              name       = 'language_id',
225              DATA       = languages,
226              show_empty = 1,
227              id_key     = 'id',
228              label_key  = 'description',
229        -%]
230       </td>
231
232       [%- IF is_customer %]
233       <th align="right">[% 'Preisklasse' | $T8 %]</th>
234       <td>
235        [%- INCLUDE generic/multibox.html
236              name       = 'klass',
237              DATA       = all_pricegroup,
238              show_empty = 1,
239              id_key     = 'id',
240              label_key  = 'pricegroup',
241        -%]
242       </td>
243       [%- END  %]
244      </tr>
245
246      <tr>
247       <td align="right">[% 'Obsolete' | $T8 %]</td>
248       <td><input name="obsolete" class="checkbox" type="checkbox" value="1" [% IF obsolete %]checked[% END %]></td>
249       <td align="right">[% 'direct debit' | $T8 %]</td>
250       <td><input name="direct_debit" class="checkbox" type="checkbox" value="1" [% IF direct_debit %]checked[% END %]></td>
251      </tr>
252
253      <tr>
254       <th align="right">[% 'Steuersatz' | $T8 %]</th>
255       <td>
256        [%- INCLUDE generic/multibox.html
257              name       = 'taxzone_id',
258              DATA       = ALL_TAXZONES,
259              show_empty = 1,
260              id_key     = 'id',
261              label_key  = 'description',
262        -%]
263       </td>
264       [%- IF is_customer && !conf_vertreter %]
265       <th align="right">[% 'Salesman' | $T8 %]</th>
266       <td>
267        [%- INCLUDE generic/multibox.html
268              name       = 'salesman_id',
269              DATA       = ALL_SALESMEN,
270              show_empty = 1,
271              id_key     = 'id',
272              label_sub  = 'salesman_label',
273        -%]
274       </td>
275       [%- END %]
276      </tr>
277     </table>
278
279     <table>
280      <tr>
281       <th align="left" nowrap>[% 'Notes' | $T8 %]</th>
282      </tr>
283
284      <tr>
285       <td><textarea name="notes" rows="3" cols="60" wrap="soft">[% HTML.escape(notes) %]</textarea></td>
286      </tr>
287     </table>
288
289     <br style="clear: left" />
290    </div>
291
292    <div id="shipto" class="tabcontent">
293
294     <table width="100%">
295      <tr>
296       <th align="right">[% 'Shipping Address' | $T8 %]</th>
297       <td>
298        [%- INCLUDE generic/multibox.html
299              name       = 'shipto_id',
300              id         = 'shipto_id',
301              DATA       = SHIPTO,
302              onChange   = "get_shipto(['shipto_id__' + this.value], ['shiptoname','shiptodepartment_1', 'shiptodepartment_2','shiptostreet','shiptozipcode','shiptocity','shiptocountry','shiptocontact','shiptophone','shiptofax','shiptoemail',enable_delete_shipto,set_gender])",
303              id_key     = 'shipto_id',
304              label_sub  = 'shipto_label',
305              label_key  = 'shipto_label',
306        -%]
307       </td>
308      </tr>
309
310      <tr>
311       <th align="right" nowrap>[% 'Company Name' | $T8 %]</th>
312       <td><input id="shiptoname" name="shiptoname" size="35" maxlength="75" value="[% HTML.escape(shiptoname) %]"></td>
313      </tr>
314
315      <tr>
316       <th align="right" nowrap>[% 'Abteilung' | $T8 %]</th>
317       <td>
318        <input id="shiptodepartment_1" name="shiptodepartment_1" size="16" maxlength="75" value="[% HTML.escape(shiptodepartment_1) %]">
319        <input id="shiptodepartment_2" name="shiptodepartment_2" size="16" maxlength="75" value="[% HTML.escape(shiptodepartment_2) %]">
320       </td>
321      </tr>
322
323      <tr>
324       <th align="right" nowrap>[% 'Street' | $T8 %]</th>
325       <td><input id="shiptostreet" name="shiptostreet" size="35" maxlength="75" value="[% HTML.escape(shiptostreet) %]"></td>
326      </tr>
327
328      <tr>
329       <th align="right" nowrap>[% 'Zipcode' | $T8 %]/[% 'City' | $T8 %]</th>
330       <td>
331        <input id="shiptozipcode" name="shiptozipcode" size="5" maxlength="75" value="[% HTML.escape(shiptozipcode) %]">
332        <input id="shiptocity" name="shiptocity" size="30" maxlength="75" value="[% HTML.escape(shiptocity) %]">
333       </td>
334      </tr>
335
336      <tr>
337       <th align="right" nowrap>[% 'Country' | $T8 %]</th>
338       <td><input id="shiptocountry" name="shiptocountry" size="35" maxlength="75" value="[% HTML.escape(shiptocountry) %]"></td>
339      </tr>
340
341      <tr>
342       <th align="right" nowrap>[% 'Contact' | $T8 %]</th>
343       <td><input id="shiptocontact" name="shiptocontact" size="30" maxlength="75" value="[% HTML.escape(shiptocontact) %]"></td>
344      </tr>
345
346      <tr>
347       <th align="right" nowrap>[% 'Phone' | $T8 %]</th>
348       <td><input id="shiptophone" name="shiptophone" size="30" maxlength="30" value="[% HTML.escape(shiptophone) %]"></td>
349      </tr>
350
351      <tr>
352       <th align="right" nowrap>[% 'Fax' | $T8 %]</th>
353       <td><input id="shiptofax" name="shiptofax" size="30" maxlength="30" value="[% HTML.escape(shiptofax) %]"></td>
354      </tr>
355
356      <tr>
357       <th align="right" nowrap>[% 'E-mail' | $T8 %]</th>
358       <td><input id="shiptoemail" name="shiptoemail" size="45" value="[% HTML.escape(shiptoemail) %]"></td>
359      </tr>
360
361      <tr>
362       <td>&nbsp;</td>
363      </tr>
364      <tr>
365       <td>&nbsp;</td>
366      </tr>
367     </table>
368
369     <input type="submit" id="delete_shipto" name="action" value="[% 'Delete Shipto' | $T8 %]" disabled>
370     <br style="clear: left" />
371    </div>
372
373    <div id="contacts" class="tabcontent">
374     <table>
375      <input type="hidden" name="cp_id" value="[% HTML.escape(cp_id) %]">
376      <tr>
377       <th align="right">[% 'Ansprechpartner' | $T8 %]</th>
378       <td>
379        [%- INCLUDE generic/multibox.html
380              name       = 'cp_id',
381              id         = 'cp_id',
382              DATA       = CONTACTS,
383              onChange   = "on_contact_changed()",
384              id_key     = 'cp_id',
385              label_sub  = 'contacts_label',
386        -%]
387       </td>
388      </tr>
389
390     <tr>
391      <th align="left" nowrap>[% 'Gender' | $T8 %]</th>
392      <td>
393       <select id="cp_gender" name="cp_gender">
394        <option value="m"[% IF cp_gender == 'm' %] selected[% END %]>[% 'male' | $T8 %]</option>
395        <option value="f"[% IF cp_gender == 'f' %] selected[% END %]>[% 'female' | $T8 %]</option>
396       </select>
397      </td>
398     </tr>
399     <tr>
400
401      <tr>
402       <th align="left" nowrap>[% 'Title' | $T8 %]</th>
403       <td>
404        <input id="cp_title" name="cp_title" size="40" maxlength="75" value="[% HTML.escape(cp_title) %]">&nbsp;
405        [%- INCLUDE generic/multibox.html
406              name       = 'selected_cp_title',
407              id         = 'selected_cp_title',
408              DATA       = MB_TITLES,
409              show_empty = 1,
410              id_key     = 'id',
411              label_key  = 'description',
412        -%]
413       </td>
414      </tr>
415
416      <tr>
417       <th align="left" nowrap>[% 'Department' | $T8 %]</th>
418       <td>
419        <input id="cp_abteilung" name="cp_abteilung" size="40" value="[% HTML.escape(cp_abteilung) %]">&nbsp;
420        [%- INCLUDE generic/multibox.html
421              name       = 'selected_cp_abteilung',
422              id         = 'selected_cp_abteilung',
423              DATA       = MB_DEPARTMENT,
424              show_empty = 1,
425              id_key     = 'id',
426              label_key  = 'description',
427        -%]
428       </td>
429      </tr>
430
431      <tr>
432       <th align="left" nowrap>[% 'Given Name' | $T8 %]</th>
433       <td><input id="cp_givenname" name="cp_givenname" size="40" maxlength="75" value="[% HTML.escape(cp_givenname) %]"></td>
434      </tr>
435
436      <tr>
437       <th align="left" nowrap>[% 'Name' | $T8 %]</th>
438       <td><input id="cp_name" name="cp_name" size="40" maxlength="75" value="[% HTML.escape(cp_name) %]"></td>
439      </tr>
440
441      <tr>
442       <th align="left" nowrap>[% 'Phone1' | $T8 %]</th>
443       <td><input id="cp_phone1" name="cp_phone1" size="40" maxlength="75" value="[% HTML.escape(cp_phone1) %]"></td>
444      </tr>
445
446      <tr>
447       <th align="left" nowrap>[% 'Phone2' | $T8 %]</th>
448       <td><input id="cp_phone2" name="cp_phone2" size="40" maxlength="75" value="[% HTML.escape(cp_phone2) %]"></td>
449      </tr>
450
451      <tr>
452       <th align="left" nowrap>[% 'Fax' | $T8 %]</th>
453       <td><input id="cp_fax" name="cp_fax" size="40" value="[% HTML.escape(cp_fax) %]"></td>
454      </tr>
455
456      <tr>
457       <th align="left" nowrap>[% 'Mobile1' | $T8 %]</th>
458       <td><input id="cp_mobile1" name="cp_mobile1" size="40" value="[% HTML.escape(cp_mobile1) %]"></td>
459      </tr>
460
461      <tr>
462       <th align="left" nowrap>[% 'Mobile2' | $T8 %]</th>
463       <td><input id="cp_mobile2" name="cp_mobile2" size="40" value="[% HTML.escape(cp_mobile2) %]"></td>
464      </tr>
465
466      <tr>
467       <th align="left" nowrap>[% 'Sat. Phone' | $T8 %]</th>
468       <td><input id="cp_satphone" name="cp_satphone" size="40" value="[% HTML.escape(cp_satphone) %]"></td>
469      </tr>
470
471      <tr>
472       <th align="left" nowrap>[% 'Sat. Fax' | $T8 %]</th>
473       <td><input id="cp_satfax" name="cp_satfax" size="40" value="[% HTML.escape(cp_satfax) %]"></td>
474      </tr>
475
476      <tr>
477       <th align="left" nowrap>[% 'Project' | $T8 %]</th>
478       <td><input id="cp_project" name="cp_project" size="40" value="[% HTML.escape(cp_project) %]"></td>
479      </tr>
480
481      <tr>
482       <th align="left" nowrap>[% 'E-mail' | $T8 %]</th>
483       <td><input id="cp_email" name="cp_email" size="40" value="[% HTML.escape(cp_email) %]"></td>
484      </tr>
485
486      <tr>
487       <th align="left" nowrap>[% 'Private Phone' | $T8 %]</th>
488       <td><input id="cp_privatphone" name="cp_privatphone" size="40" value="[% HTML.escape(cp_privatphone) %]"></td>
489      </tr>
490
491      <tr>
492       <th align="left" nowrap>[% 'Private E-mail' | $T8 %]</th>
493       <td><input id="cp_privatemail" name="cp_privatemail" size="40" value="[% HTML.escape(cp_privatemail) %]"></td>
494      </tr>
495
496      <tr>
497       <th align="left" nowrap>[% 'Birthday' | $T8 %]</th>
498       <td><input id="cp_birthday" name="cp_birthday" size="40" value="[% HTML.escape(cp_birthday) %]"></td>
499      </tr>
500
501      <tr>
502       <td colspan="2"><hr></td>
503      </tr>
504
505      <tr>
506       <th align="left" nowrap>[% 'Bcc' | $T8 %]</th>
507       <td><input name="bcc" size="40" value="[% HTML.escape(bcc) %]"></td>
508      </tr>
509     </table>
510
511     <input type="submit" id="delete_contact" name="action" value="[% 'Delete Contact' | $T8 %]" disabled>
512     <br style="clear: left" />
513    </div>
514
515    <div id="deliveries" class="tabcontent">
516     <table>
517      <tr>
518       <th align="right">[% 'Shipping Address' | $T8 %]</th>
519       <td>
520        [%- INCLUDE generic/multibox.html
521              name       = 'delivery_id',
522              id         = 'delivery_id',
523              DATA       = SHIPTO,
524              onChange   = "get_delivery(['shipto_id__' + this.value, 'from__' + from.value, 'to__' + to.value, 'id__' + cvid.value, 'db__' + db.value], ['delivery'])",
525              id_key     = 'shipto_id',
526              label_sub  = 'shipto_label',
527        -%]
528       </td>
529      </tr>
530
531      <tr>
532       <th align="right" nowrap>[% 'From' | $T8 %]</th>
533       <td>
534        <input id="from" name="from" size="10" maxlength="10" onChange="get_delivery(['shipto_id__' + delivery_id.value, 'from__' + this.value, 'to__' + to.value, 'id__' + cvid.value, 'db__' + db.value], ['delivery'])" value="[% HTML.escape(from) %]">
535        <input type="button" name="fromB" id="trigger_from" value="?">
536       </td>
537       <th align="right" nowrap>[% 'To (time)' | $T8 %]</th>
538       <td>
539        <input id="to" name="to" size="10" maxlength="10" onChange="get_delivery(['shipto_id__' + delivery_id.value, 'from__' + from.value, 'to__' + this.value, 'id__' + cvid.value, 'db__' + db.value], ['delivery'])" value="[% HTML.escape(to) %]">
540        <input type="button" name="toB" id="trigger_to" value="?">
541       </td>
542      </tr>
543
544      <tr>
545       <td colspan="4">
546        <div id="delivery">
547        </div>
548       </td>
549      </tr>
550     </table>
551
552     <br style="clear: left" />
553    </div>
554
555    <div id="vcnotes" class="tabcontent">
556
557     [%- IF NOTES && NOTES.size %]
558     <p>
559      <table>
560       <tr>
561        <th class="listheading">[% 'Delete' | $T8 %]</th>
562        <th class="listheading">[% 'Subject' | $T8 %]</th>
563        <th class="listheading">[% 'Created on' | $T8 %]</th>
564        <th class="listheading">[% 'Created by' | $T8 %]</th>
565        <th class="listheading">[% 'Follow-Up Date' | $T8 %]</th>
566        <th class="listheading">[% 'Follow-Up for' | $T8 %]</th>
567        <th class="listheading">[% 'Follow-Up done' | $T8 %]</th>
568       </tr>
569
570       [%- FOREACH row = NOTES %]
571       <tr class="listrow[% loop.count % 2 %]">
572        <input type="hidden" name="NOTE_id_[% loop.count %]" value="[% HTML.escape(row.id) %]">
573        <td>[% UNLESS NOTE_id && (NOTE_id == row.id) %]<input type="checkbox" name="NOTE_delete_[% loop.count %]" value="1">[% END %]</td>
574        <td><a href="ct.pl?action=edit&db=[% HTML.url(db) %]&id=[% HTML.url(id) %]&edit_note_id=[% HTML.url(row.id) %]">[% HTML.escape(row.subject) %]</a></td>
575        <td>[% HTML.escape(row.created_on) %]</td>
576        <td>[% IF row.created_by_name %][% HTML.escape(row.created_by_name) %][% ELSE %][% HTML.escape(row.created_by_login) %][% END %]</td>
577        <td>[% HTML.escape(row.follow_up_date) %]</td>
578        <td>[% IF row.created_for_name %][% HTML.escape(row.created_for_name) %][% ELSE %][% HTML.escape(row.created_for_login) %][% END %]</td>
579        <td>[% IF row.follow_up_date %][% IF row.follow_up_done %][% 'Yes' | $T8 %][% ELSE %][% 'No' | $T8 %][% END %][% END %]</td>
580       </tr>
581       [%- END %]
582
583       <input type="hidden" name="NOTES_rowcount" value="[% NOTES.size %]">
584
585      </table>
586     </p>
587     [%- END %]
588
589     <div class="listtop">[% IF NOTE_id %][% 'Edit note' | $T8 %][% ELSE %][% 'Add note' | $T8 %][% END %]</div>
590
591     <input type="hidden" name="NOTE_id" value="[% HTML.escape(NOTE_id) %]">
592     <input type="hidden" name="FU_id" value="[% HTML.escape(FU_id) %]">
593
594     <p>
595      <table>
596       <tr>
597        <td valign="right">[% 'Subject' | $T8 %]</td>
598        <td><input name="NOTE_subject" value="[% HTML.escape(NOTE_subject) %]" size="50"></td>
599       </tr>
600
601       <tr>
602        <td valign="right" align="top">[% 'Body' | $T8 %]</td>
603        <td align="top"><textarea cols="50" rows="10" name="NOTE_body">[% HTML.escape(NOTE_body) %]</textarea></td>
604       </tr>
605
606       <tr>
607        <td valign="right">[% 'Follow-Up On' | $T8 %]</td>
608        <td>
609         <input name="FU_date" id="FU_date" value="[% HTML.escape(FU_date) %]" size="12">
610         <input type="button" name="FU_date_button" id="FU_date_trigger" value="?">
611         [% 'for' | $T8 %]
612         <select name="FU_created_for_user">
613          [%- FOREACH row = ALL_EMPLOYEES %]
614          <option value="[% HTML.escape(row.id) %]"[% IF (NOTE_id && (row.id == FU_created_for_user)) || (row.login == login) %] selected[% END %]>
615           [%- IF row.name %][%- HTML.escape(row.name) %] ([% HTML.escape(row.login) %])[% ELSE %][% HTML.escape(row.login) %][% END %]
616          </option>
617          [%- END %]
618         </select>
619        </td>
620       </tr>
621
622       <tr>
623        <td>&nbsp;</td>
624        <td>
625         <input type="checkbox" name="FU_done" id="FU_done" value="1"[% IF FU_done %] checked[% END %]>
626         <label for="FU_done">[% 'Follow-Up done' | $T8 %]</label>
627        </td>
628       </tr>
629      </table>
630     </p>
631
632     <br style="clear: left" />
633    </div>
634
635    [%- IF CUSTOM_VARIABLES.size %]
636    <div id="custom_variables" class="tabcontent">
637
638     <p>
639      <table>
640       [%- FOREACH var = CUSTOM_VARIABLES %]
641       <tr>
642        <td align="right" valign="top">[% HTML.escape(var.description) %]</td>
643        <td valign="top">[% var.HTML_CODE %]</td>
644       </tr>
645       [%- END %]
646      </table>
647     </p>
648
649     <br style="clear: left" />
650    </div>
651    [%- END %]
652
653   </div>
654
655   <script type="text/javascript" src="js/jquery.js"></script>
656   <script type="text/javascript">
657    <!--
658    function set_gender(gender) {
659      var s = document.getElementById('cp_gender');
660      if (s) {
661        s.selectedIndex = (gender == 'f') ? 1 : 0;
662      }
663    }
664
665    function on_contact_changed() {
666      get_contact(['cp_id__' + $('#cp_id').attr('value')],
667                  ['cp_name','cp_title','cp_givenname','cp_phone1','cp_phone2','cp_email','cp_abteilung','cp_fax','cp_mobile1','cp_mobile2',
668                   'cp_satphone','cp_satfax','cp_project','cp_privatphone','cp_privatemail','cp_birthday',enable_delete_contact,set_gender]);
669      $('#selected_cp_title').attr('selectedIndex', 0);
670      $('#selected_cp_abteilung').attr('selectedIndex', 0);
671    }
672   -->
673
674   </script>