$::request->layout->focus() größtenteils durch class="initial_focus" ersetzen
[kivitendo-erp.git] / templates / webpages / ct / form_header.html
index 4e9c408..294cf47 100644 (file)
@@ -1,25 +1,28 @@
 [%- USE T8 %]
 [% USE HTML %][% USE LxERP %]
-<body onLoad="fokus()">
+[% USE L %]
 
- <div class="listtop">[% title %]</div>
+ <h1>[% title %]</h1>
 
- <form method="post" name="ct" action="ct.pl" onKeyUp="highlight(event)" onClick="highlight(event)">
+ [% PROCESS 'common/flash.html' %]
 
-  <ul id="maintab" class="shadetabs">
-   <li class="selected"><a href="#" rel="billing">[% 'Billing Address' | $T8 %]</a></li>
-   <li><a href="#" rel="shipto">[% 'Shipping Address' | $T8 %]</a></li>
-   <li><a href="#" rel="contacts">[% 'Contacts' | $T8 %]</a></li>
-   <li><a href="#" rel="deliveries">[% 'Supplies' | $T8 %]</a></li>
-   <li><a href="#" rel="vcnotes">[% 'Notes' | $T8 %]</a></li>
-   [%- IF CUSTOM_VARIABLES.size %]
-   <li><a href="#" rel="custom_variables">[% 'Custom Variables' | $T8 %]</a></li>
-   [%- END %]
-  </ul>
+ <form method="post" name="ct" action="ct.pl" >
 
-  <div class="tabcontentstyle">
+  <div class="tabwidget">
+   <ul>
+    <li><a href="#billing">[% 'Billing Address' | $T8 %]</a></li>
+    <li><a href="#shipto">[% 'Shipping Address' | $T8 %]</a></li>
+    <li><a href="#contacts">[% 'Contacts' | $T8 %]</a></li>
+[%- IF id %]
+    <li><a href="#deliveries">[% 'Supplies' | $T8 %]</a></li>
+[%- END %]
+    <li><a href="#vcnotes">[% 'Notes' | $T8 %]</a></li>
+[%- IF CUSTOM_VARIABLES.CT.size %]
+    <li><a href="#custom_variables">[% 'Custom Variables' | $T8 %]</a></li>
+[%- END %]
+   </ul>
 
-   <div id="billing" class="tabcontent">
+   <div id="billing">
 
     <table width="100%">
      <tr height="5"></tr>
@@ -77,7 +80,7 @@
      <tr>
       <th align="right" nowrap>[% 'Greeting' | $T8 %]</th>
       <td>
-       <input id="greeting" name="greeting" size="30" value="[% HTML.escape(greeting) %]">&nbsp;
+       <input id="greeting" name="greeting" size="30" value="[% HTML.escape(greeting) %]" class="initial_focus">&nbsp;
        [%- INCLUDE generic/multibox.html
              name       = 'selected_company_greeting',
              DATA       = MB_COMPANY_GREETINGS,
 
      <tr>
       <th align="right" nowrap>[% 'Street' | $T8 %]</th>
-      <td><input name="street" size="35" maxlength="75" value="[% HTML.escape(street) %]"></td>
+      <td>
+        <input name="street" size="35" maxlength="75" value="[% HTML.escape(street) %]">
+        <a
+          href="#"
+          onclick="window.open('https://maps.google.com/maps?q='+ encodeURIComponent($('#billing input[name=street]').val() +', '+ $('#billing input[name=zipcode]').val() +' '+ $('#billing input[name=city]').val() +', '+ $('#billing input[name=country]').val()), '_blank'); window.focus();"
+          title="[% 'Map' | $T8 %]"
+          >
+            <img src="image/map.png" alt="[% 'Map' | $T8 %]" />
+          </a>
+      </td>
      </tr>
 
      <tr>
 
      <tr>
       <th align="right" nowrap>[% 'Phone' | $T8 %]</th>
-      <td><input name="phone" size="30" maxlength="30" value="[% HTML.escape(phone) %]"></td>
+      <td><input name="phone" size="30" value="[% HTML.escape(phone) %]"></td>
      </tr>
 
      <tr>
      </tr>
 
      <tr>
-      <th align="right" nowrap>[% 'Homepage' | $T8 %]</th>
-      <td><input name="homepage" size="45" value="[% HTML.escape(homepage) %]"></td>
+      <th align="right" nowrap>[% 'Cc E-mail' | $T8 %]</th>
+      <td><input name="cc" size="45" value="[% HTML.escape(cc) %]"></td>
+     </tr>
+
+     <tr>
+      <th align="right" nowrap>[% 'Bcc E-mail' | $T8 %]</th>
+      <td><input name="bcc" size="45" value="[% HTML.escape(bcc) %]"></td>
+     </tr>
+
+
+     <tr>
+      <th align="right" nowrap>
+      [% IF homepage %]<a href="[% HTML.escape(homepage) %]" title="[% 'Open this Website' | $T8 %]" target="_blank">[% 'Homepage' | $T8 %]</a>
+      [% ELSE %][% 'Homepage' | $T8 %]
+      [% END %]
+      </th>
+      <td><input name="homepage" size="45" title="[% 'Example: http://kivitendo.de' | $T8 %]" value="[% HTML.escape(homepage) %]"></td>
+     </tr>
+
+     <tr>
+      <th align="right" nowrap>[% 'Username' | $T8 %]</th>
+      <td><input name="username" size="45" value="[% HTML.escape(username) %]"></td>
+     </tr>
+
+     <tr>
+      <th align="right" nowrap>[% 'Password' | $T8 %]</th>
+      <td><input name="user_password" size="45" value="[% HTML.escape(user_password) %]"></td>
      </tr>
     </table>
 
       <td><input name="taxnumber" size="20" value="[% HTML.escape(taxnumber) %]"></td>
       <!-- 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 -->
       <th align="right">[% 'sales tax identification number' | $T8 %]</th>
-      <td><input name="ustid" maxlength="14" size="20" value="[% HTML.escape(ustid) %]"></td>
+      <td>[% L.input_tag('ustid', ustid, maxlength=14, size=30) %]</td>
       [%- IF is_customer %]
       <th align="right">[% 'our vendor number at customer' | $T8 %]</th>
-      <td><input name="c_vendor_id" size="10" value="[% HTML.escape(c_vendor_id) %]"></td>
+      <td>[% L.input_tag('c_vendor_id', c_vendor_id, size=30) %]</td>
       [%- ELSE %]
       <th align="right">[% 'Customer Number' | $T8 %]</th>
-      <td><input name="v_customer_id" size="10" value="[% HTML.escape(v_customer_id) %]"></td>
+      <td>[% L.input_tag('v_customer_id', v_customer_id, size=30) %]</td>
       [%- END %]
      </tr>
 
      <tr>
       <th align="right">[% 'Account Number' | $T8 %]</th>
-      <td><input name="account_number" size="10" maxlength="100" value="[% HTML.escape(account_number) %]"></td>
+      <td>[% L.input_tag('account_number', account_number, size=30) %]</td>
       <th align="right">[% 'Bank Code Number' | $T8 %]</th>
-      <td><input name="bank_code" size="10" maxlength="100" value="[% HTML.escape(bank_code) %]"></td>
+      <td>[% L.input_tag('bank_code', bank_code, size=30) %]</td>
       <th align="right">[% 'Bank' | $T8 %]</th>
-      <td><input name="bank" size="20" value="[% HTML.escape(bank) %]"></td>
+      <td>[% L.input_tag('bank', bank, size=30) %]</td>
      </tr>
 
      <tr>
       <th align="right">[% 'IBAN' | $T8 %]</th>
-      <td><input name="iban" size="10" maxlength="100" value="[% HTML.escape(iban) %]"></td>
+      <td>[% L.input_tag('iban', iban, maxlength=100, size=30) %]</td>
       <th align="right">[% 'BIC' | $T8 %]</th>
-      <td><input name="bic" size="10" maxlength="100" value="[% HTML.escape(bic) %]"></td>
+      <td>[% L.input_tag('bic', bic, maxlength=100, size=30) %]</td>
+      [%- IF ALL_CURRENCIES.size %]
+        <th align="right">[% 'Currency' | $T8 %]</th>
+        <td>[% L.select_tag('currency', ALL_CURRENCIES, default = currency) %]</td>
+      [%- END %]
      </tr>
 
-     [%- IF conf_vertreter %]
-      <tr>
-       <th align="right">[% 'Username' | $T8 %]</th>
-       <td><input name="username" maxlength="50" value="[% HTML.escape(username) %]"></td>
-       <th align="right">[% 'Password' | $T8 %]</th>
-       <td><input name="user_password" value="[% HTML.escape(user_password) %]"></td>
-      </tr>
-     [%- END %]
-
      <tr>
       [% UNLESS conf_vertreter %]
        <th align="right">[% IF is_customer %][% 'Type of Customer' | $T8 %][% ELSE %][% 'Type of Vendor' | $T8 %][%- END %]</th>
       <td>
        [%- INCLUDE generic/multibox.html
              name       = 'language_id',
+             default    = default_language_id,
              DATA       = languages,
              show_empty = 1,
              id_key     = 'id',
      </tr>
 
      <tr>
-      <td align="right">[% 'Obsolete' | $T8 %]</td>
-      <td><input name="obsolete" class="checkbox" type="checkbox" value="1" [% IF obsolete %]checked[% END %]></td>
-      <td align="right">[% 'direct debit' | $T8 %]</td>
-      <td><input name="direct_debit" class="checkbox" type="checkbox" value="1" [% IF direct_debit %]checked[% END %]></td>
+      <td align="right"><label for="obsolete">[% 'Obsolete' | $T8 %]</label></td>
+      <td><input name="obsolete" id="obsolete" class="checkbox" type="checkbox" value="1" [% IF obsolete %]checked[% END %]></td>
+      <td align="right"><label for="direct_debit">[% 'direct debit' | $T8 %]</label></td>
+      <td><input name="direct_debit" id="direct_debit" class="checkbox" type="checkbox" value="1" [% IF direct_debit %]checked[% END %]></td>
      </tr>
 
      <tr>
       <td>
        [%- INCLUDE generic/multibox.html
              name       = 'taxzone_id',
+             id         = 'taxzone_id',
              DATA       = ALL_TAXZONES,
-             show_empty = 1,
+             show_empty = 0,
              id_key     = 'id',
              label_key  = 'description',
        -%]
       </td>
       [%- IF is_customer && !conf_vertreter %]
       <th align="right">[% 'Salesman' | $T8 %]</th>
-      <td>
-       [%- INCLUDE generic/multibox.html
-             name       = 'salesman_id',
-             DATA       = ALL_SALESMEN,
-             show_empty = 1,
-             id_key     = 'id',
-             label_sub  = 'salesman_label',
-       -%]
-      </td>
+      <td>[% L.select_tag('salesman_id', ALL_SALESMEN, default = salesman_id, with_empty = 1, title_key = 'safe_name') %]</td>
       [%- END %]
+
+      <td>[% 'taxincluded checked' | $T8 %]</td>
+      <td>[% L.select_tag('taxincluded_checked', [[undef, LxERP.t8('use user config')], ['1', LxERP.t8('Yes')], ['0', LxERP.t8('No')]], default = taxincluded_checked) %]</td>
      </tr>
     </table>
 
     <table>
      <tr>
-      <th align="left" nowrap>[% 'Notes' | $T8 %]</th>
+      <th align="left" nowrap>[% 'Internal Notes' | $T8 %]</th>
      </tr>
 
      <tr>
       <td><textarea name="notes" rows="3" cols="60" wrap="soft">[% HTML.escape(notes) %]</textarea></td>
      </tr>
     </table>
-
-    <br style="clear: left" />
    </div>
 
-   <div id="shipto" class="tabcontent">
-
-    <table width="100%">
-     <tr>
-      <th align="right">[% 'Shipping Address' | $T8 %]</th>
-      <td>
-       [%- INCLUDE generic/multibox.html
-             name       = 'shipto_id',
-             id         = 'shipto_id',
-             DATA       = SHIPTO,
-             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])",
-             id_key     = 'shipto_id',
-             label_sub  = 'shipto_label',
-             label_key  = 'shipto_label',
-       -%]
-      </td>
-     </tr>
-
-     <tr>
-      <th align="right" nowrap>[% 'Company Name' | $T8 %]</th>
-      <td><input id="shiptoname" name="shiptoname" size="35" maxlength="75" value="[% HTML.escape(shiptoname) %]"></td>
-     </tr>
-
-     <tr>
-      <th align="right" nowrap>[% 'Abteilung' | $T8 %]</th>
-      <td>
-       <input id="shiptodepartment_1" name="shiptodepartment_1" size="16" maxlength="75" value="[% HTML.escape(shiptodepartment_1) %]">
-       <input id="shiptodepartment_2" name="shiptodepartment_2" size="16" maxlength="75" value="[% HTML.escape(shiptodepartment_2) %]">
-      </td>
-     </tr>
-
-     <tr>
-      <th align="right" nowrap>[% 'Street' | $T8 %]</th>
-      <td><input id="shiptostreet" name="shiptostreet" size="35" maxlength="75" value="[% HTML.escape(shiptostreet) %]"></td>
-     </tr>
-
-     <tr>
-      <th align="right" nowrap>[% 'Zipcode' | $T8 %]/[% 'City' | $T8 %]</th>
-      <td>
-       <input id="shiptozipcode" name="shiptozipcode" size="5" maxlength="75" value="[% HTML.escape(shiptozipcode) %]">
-       <input id="shiptocity" name="shiptocity" size="30" maxlength="75" value="[% HTML.escape(shiptocity) %]">
-      </td>
-     </tr>
-
-     <tr>
-      <th align="right" nowrap>[% 'Country' | $T8 %]</th>
-      <td><input id="shiptocountry" name="shiptocountry" size="35" maxlength="75" value="[% HTML.escape(shiptocountry) %]"></td>
-     </tr>
-
-     <tr>
-      <th align="right" nowrap>[% 'Contact' | $T8 %]</th>
-      <td><input id="shiptocontact" name="shiptocontact" size="30" maxlength="75" value="[% HTML.escape(shiptocontact) %]"></td>
-     </tr>
-
-     <tr>
-      <th align="right" nowrap>[% 'Phone' | $T8 %]</th>
-      <td><input id="shiptophone" name="shiptophone" size="30" maxlength="30" value="[% HTML.escape(shiptophone) %]"></td>
-     </tr>
-
-     <tr>
-      <th align="right" nowrap>[% 'Fax' | $T8 %]</th>
-      <td><input id="shiptofax" name="shiptofax" size="30" maxlength="30" value="[% HTML.escape(shiptofax) %]"></td>
-     </tr>
-
-     <tr>
-      <th align="right" nowrap>[% 'E-mail' | $T8 %]</th>
-      <td><input id="shiptoemail" name="shiptoemail" size="45" value="[% HTML.escape(shiptoemail) %]"></td>
-     </tr>
-
-     <tr>
-      <td>&nbsp;</td>
-     </tr>
-     <tr>
-      <td>&nbsp;</td>
-     </tr>
-    </table>
-
-    <input type="submit" id="delete_shipto" name="action" value="[% 'Delete Shipto' | $T8 %]" disabled>
-    <br style="clear: left" />
+   <div id="shipto">
+    [% INCLUDE 'ct/_shipto.html' %]
    </div>
 
-   <div id="contacts" class="tabcontent">
-    <table>
-     <input type="hidden" name="cp_id" value="[% HTML.escape(cp_id) %]">
-     <tr>
-      <th align="right">[% 'Ansprechpartner' | $T8 %]</th>
-      <td>
-       [%- INCLUDE generic/multibox.html
-             name       = 'cp_id',
-             id         = 'cp_id',
-             DATA       = CONTACTS,
-             onChange   = "on_contact_changed()",
-             id_key     = 'cp_id',
-             label_sub  = 'contacts_label',
-       -%]
-      </td>
-     </tr>
-
-    <tr>
-     <th align="left" nowrap>[% 'Gender' | $T8 %]</th>
-     <td>
-      <select id="cp_gender" name="cp_gender">
-       <option value="m"[% IF cp_gender == 'm' %] selected[% END %]>[% 'male' | $T8 %]</option>
-       <option value="f"[% IF cp_gender == 'f' %] selected[% END %]>[% 'female' | $T8 %]</option>
-      </select>
-     </td>
-    </tr>
-    <tr>
-
-     <tr>
-      <th align="left" nowrap>[% 'Title' | $T8 %]</th>
-      <td>
-       <input id="cp_title" name="cp_title" size="40" maxlength="75" value="[% HTML.escape(cp_title) %]">&nbsp;
-       [%- INCLUDE generic/multibox.html
-             name       = 'selected_cp_title',
-             id         = 'selected_cp_title',
-             DATA       = MB_TITLES,
-             show_empty = 1,
-             id_key     = 'id',
-             label_key  = 'description',
-       -%]
-      </td>
-     </tr>
-
-     <tr>
-      <th align="left" nowrap>[% 'Department' | $T8 %]</th>
-      <td>
-       <input id="cp_abteilung" name="cp_abteilung" size="40" value="[% HTML.escape(cp_abteilung) %]">&nbsp;
-       [%- INCLUDE generic/multibox.html
-             name       = 'selected_cp_abteilung',
-             id         = 'selected_cp_abteilung',
-             DATA       = MB_DEPARTMENT,
-             show_empty = 1,
-             id_key     = 'id',
-             label_key  = 'description',
-       -%]
-      </td>
-     </tr>
-
-     <tr>
-      <th align="left" nowrap>[% 'Given Name' | $T8 %]</th>
-      <td><input id="cp_givenname" name="cp_givenname" size="40" maxlength="75" value="[% HTML.escape(cp_givenname) %]"></td>
-     </tr>
-
-     <tr>
-      <th align="left" nowrap>[% 'Name' | $T8 %]</th>
-      <td><input id="cp_name" name="cp_name" size="40" maxlength="75" value="[% HTML.escape(cp_name) %]"></td>
-     </tr>
-
-     <tr>
-      <th align="left" nowrap>[% 'Phone1' | $T8 %]</th>
-      <td><input id="cp_phone1" name="cp_phone1" size="40" maxlength="75" value="[% HTML.escape(cp_phone1) %]"></td>
-     </tr>
-
-     <tr>
-      <th align="left" nowrap>[% 'Phone2' | $T8 %]</th>
-      <td><input id="cp_phone2" name="cp_phone2" size="40" maxlength="75" value="[% HTML.escape(cp_phone2) %]"></td>
-     </tr>
-
-     <tr>
-      <th align="left" nowrap>[% 'Fax' | $T8 %]</th>
-      <td><input id="cp_fax" name="cp_fax" size="40" value="[% HTML.escape(cp_fax) %]"></td>
-     </tr>
-
-     <tr>
-      <th align="left" nowrap>[% 'Mobile1' | $T8 %]</th>
-      <td><input id="cp_mobile1" name="cp_mobile1" size="40" value="[% HTML.escape(cp_mobile1) %]"></td>
-     </tr>
-
-     <tr>
-      <th align="left" nowrap>[% 'Mobile2' | $T8 %]</th>
-      <td><input id="cp_mobile2" name="cp_mobile2" size="40" value="[% HTML.escape(cp_mobile2) %]"></td>
-     </tr>
-
-     <tr>
-      <th align="left" nowrap>[% 'Sat. Phone' | $T8 %]</th>
-      <td><input id="cp_satphone" name="cp_satphone" size="40" value="[% HTML.escape(cp_satphone) %]"></td>
-     </tr>
-
-     <tr>
-      <th align="left" nowrap>[% 'Sat. Fax' | $T8 %]</th>
-      <td><input id="cp_satfax" name="cp_satfax" size="40" value="[% HTML.escape(cp_satfax) %]"></td>
-     </tr>
-
-     <tr>
-      <th align="left" nowrap>[% 'Project' | $T8 %]</th>
-      <td><input id="cp_project" name="cp_project" size="40" value="[% HTML.escape(cp_project) %]"></td>
-     </tr>
-
-     <tr>
-      <th align="left" nowrap>[% 'E-mail' | $T8 %]</th>
-      <td><input id="cp_email" name="cp_email" size="40" value="[% HTML.escape(cp_email) %]"></td>
-     </tr>
-
-     <tr>
-      <th align="left" nowrap>[% 'Private Phone' | $T8 %]</th>
-      <td><input id="cp_privatphone" name="cp_privatphone" size="40" value="[% HTML.escape(cp_privatphone) %]"></td>
-     </tr>
-
-     <tr>
-      <th align="left" nowrap>[% 'Private E-mail' | $T8 %]</th>
-      <td><input id="cp_privatemail" name="cp_privatemail" size="40" value="[% HTML.escape(cp_privatemail) %]"></td>
-     </tr>
-
-     <tr>
-      <th align="left" nowrap>[% 'Birthday' | $T8 %]</th>
-      <td><input id="cp_birthday" name="cp_birthday" size="40" value="[% HTML.escape(cp_birthday) %]"></td>
-     </tr>
-
-     <tr>
-      <td colspan="2"><hr></td>
-     </tr>
-
-     <tr>
-      <th align="left" nowrap>[% 'Bcc' | $T8 %]</th>
-      <td><input name="bcc" size="40" value="[% HTML.escape(bcc) %]"></td>
-     </tr>
-    </table>
-
-    <input type="submit" id="delete_contact" name="action" value="[% 'Delete Contact' | $T8 %]" disabled>
-    <br style="clear: left" />
+   <div id="contacts">
+    [% INCLUDE 'ct/_contact.html' %]
    </div>
 
-   <div id="deliveries" class="tabcontent">
+   <div id="deliveries">
     <table>
      <tr>
       <th align="right">[% 'Shipping Address' | $T8 %]</th>
-      <td>
-       [%- INCLUDE generic/multibox.html
-             name       = 'delivery_id',
-             id         = 'delivery_id',
-             DATA       = SHIPTO,
-             onChange   = "get_delivery(['shipto_id__' + this.value, 'from__' + from.value, 'to__' + to.value, 'id__' + cvid.value, 'db__' + db.value], ['delivery'])",
-             id_key     = 'shipto_id',
-             label_sub  = 'shipto_label',
-       -%]
+      <td colspan="3">
+       [% L.select_tag('delivery_id', SHIPTO_ALL, value_key = 'shipto_id', title_sub = \shipto_label, with_empty = 1,
+                       onchange = "\$('#delivery').load('ct.pl?action=get_delivery&id=' + \$('#cvid').val() + '&db=' + \$('#db').val() + '&shipto_id=' + this.value)") %]
       </td>
      </tr>
 
      <tr>
       <th align="right" nowrap>[% 'From' | $T8 %]</th>
       <td>
-       <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) %]">
-       <input type="button" name="fromB" id="trigger_from" value="?">
+        [% L.date_tag('from',
+                      from,
+                      onchange => "\$('#delivery').load('ct.pl?action=get_delivery&shipto_id='+ \$('#delivery_id').val() +'&from='+ \$('#from').val() +'&to='+ \$('#to').val() +'&id='+ \$('#cvid').val() +'&db='+ \$('#db').val())")
+        %]
       </td>
       <th align="right" nowrap>[% 'To (time)' | $T8 %]</th>
       <td>
-       <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) %]">
-       <input type="button" name="toB" id="trigger_to" value="?">
+       [% L.date_tag('to',
+                      to,
+                      onchange => "\$('#delivery').load('ct.pl?action=get_delivery&shipto_id='+ \$('#delivery_id').val() +'&from='+ \$('#from').val() +'&to='+ \$('#to').val() +'&id='+ \$('#cvid').val() +'&db='+ \$('#db').val())")
+       %]
       </td>
      </tr>
 
       </td>
      </tr>
     </table>
-
-    <br style="clear: left" />
    </div>
 
-   <div id="vcnotes" class="tabcontent">
+   <div id="vcnotes">
 
     [%- IF NOTES && NOTES.size %]
     <p>
       <tr>
        <td valign="right">[% 'Follow-Up On' | $T8 %]</td>
        <td>
-        <input name="FU_date" id="FU_date" value="[% HTML.escape(FU_date) %]" size="12">
-        <input type="button" name="FU_date_button" id="FU_date_trigger" value="?">
+        [% L.date_tag('FU_date', FU_date) %]
         [% 'for' | $T8 %]
-        <select name="FU_created_for_user">
-         [%- FOREACH row = ALL_EMPLOYEES %]
-         <option value="[% HTML.escape(row.id) %]"[% IF (NOTE_id && (row.id == FU_created_for_user)) || (row.login == login) %] selected[% END %]>
-          [%- IF row.name %][%- HTML.escape(row.name) %] ([% HTML.escape(row.login) %])[% ELSE %][% HTML.escape(row.login) %][% END %]
-         </option>
-         [%- END %]
-        </select>
+        [% L.select_tag('FU_created_for_user', ALL_EMPLOYEES, default = (FU_created_for_user ? FU_created_for_user : USER.id), title_key='safe_name') %]
        </td>
       </tr>
 
       </tr>
      </table>
     </p>
-
-    <br style="clear: left" />
    </div>
 
-   [%- IF CUSTOM_VARIABLES.size %]
-   <div id="custom_variables" class="tabcontent">
+   [%- IF CUSTOM_VARIABLES.CT.size %]
+   <div id="custom_variables">
 
     <p>
      <table>
-      [%- FOREACH var = CUSTOM_VARIABLES %]
+      [%- FOREACH var = CUSTOM_VARIABLES.CT %]
       <tr>
        <td align="right" valign="top">[% HTML.escape(var.description) %]</td>
        <td valign="top">[% var.HTML_CODE %]</td>
       [%- END %]
      </table>
     </p>
-
-    <br style="clear: left" />
    </div>
    [%- END %]
 
   </div>
 
-  <script type="text/javascript" src="js/jquery.js"></script>
   <script type="text/javascript">
    <!--
    function set_gender(gender) {
        s.selectedIndex = (gender == 'f') ? 1 : 0;
      }
    }
-
-   function on_contact_changed() {
-     get_contact(['cp_id__' + $('#cp_id').attr('value')],
-                 ['cp_name','cp_title','cp_givenname','cp_phone1','cp_phone2','cp_email','cp_abteilung','cp_fax','cp_mobile1','cp_mobile2',
-                  'cp_satphone','cp_satfax','cp_project','cp_privatphone','cp_privatemail','cp_birthday',enable_delete_contact,set_gender]);
-     $('#selected_cp_title').attr('selectedIndex', 0);
-     $('#selected_cp_abteilung').attr('selectedIndex', 0);
-   }
   -->
 
   </script>