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