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