Merge branch 'master' of vc.linet-services.de:public/lx-office-erp
[kivitendo-erp.git] / templates / webpages / ct / _contact.html
index 995c260..bfa4f37 100644 (file)
@@ -4,27 +4,26 @@
      <tr>
       <th align="left">[% 'Contacts' | $T8 %]</th>
       <td>
-       [%- L.select_tag('cp_id', L.options_for_select(CONTACTS, default => cp_id, with_empty => 1, empty_title => LxERP.t8('New contact'), value => 'cp_id', title_sub => \contacts_label),
-                        onchange => "\$('#contacts').load('ct.pl?action=get_contact&id=' + \$('#cvid').attr('value') + '&db=' + \$('#db').attr('value') + '&cp_id=' + \$('#cp_id').attr('value'))") %]
+       [%- L.select_tag('cp_id', CONTACTS, default = cp_id, with_empty = 1, empty_title = LxERP.t8('New contact'), value_key = 'cp_id', title_sub = \contacts_label,
+                        onchange = "\$('#contacts').load('ct.pl?action=get_contact&id=' + \$('#cvid').attr('value') + '&db=' + \$('#db').attr('value') + '&cp_id=' + \$('#cp_id').attr('value'))") %]
       </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>[% '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>
       <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;
-       [% L.select_tag('selected_cp_title', L.options_for_select(TITLES, with_empty => 1)) %]
+       [% L.select_tag('selected_cp_title', TITLES, with_empty = 1) %]
       </td>
      </tr>
 
@@ -32,7 +31,7 @@
       <th align="left" nowrap>[% 'Department' | $T8 %]</th>
       <td>
        <input id="cp_abteilung" name="cp_abteilung" size="40" value="[% HTML.escape(cp_abteilung) %]">&nbsp;
-       [% L.select_tag('selected_cp_abteilung', L.options_for_select(DEPARTMENT, with_empty => 1)) %]
+       [% L.select_tag('selected_cp_abteilung', DEPARTMENT, with_empty = 1) %]
       </td>
      </tr>
 
       <td><input id="cp_name" name="cp_name" size="40" maxlength="75" value="[% HTML.escape(cp_name) %]"></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>[% '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>[% 'E-mail' | $T8 %]</th>
-      <td><input id="cp_email" name="cp_email" size="40" value="[% HTML.escape(cp_email) %]"></td>
+      <th align="left" nowrap>[% 'Street' | $T8 %]</th>
+      <td><input id="cp_street" name="cp_street" size="40" maxlength="75" value="[% HTML.escape(cp_street) %]"></td>
+     </tr>
+
+     <tr>
+      <th align="left" nowrap>[% 'Zip, City' | $T8 %]</th>
+      <td>
+       <input id="cp_zipcode" name="cp_zipcode" size="5" maxlength="10" value="[% HTML.escape(cp_zipcode) %]">
+       <input id="cp_city" name="cp_city" size="25" maxlength="75" value="[% HTML.escape(cp_city) %]">
+      </td>
      </tr>
 
      <tr>
       <th align="left" nowrap>[% 'Bcc' | $T8 %]</th>
       <td><input name="bcc" size="40" value="[% HTML.escape(bcc) %]"></td>
      </tr>
+     [% IF CUSTOM_VARIABLES.Contacts.size %]
+     <tr>
+      <td colspan="2"><hr></td>
+     </tr>
+
+     [%- FOREACH var = CUSTOM_VARIABLES.Contacts %]
+     <tr>
+      <th align="left" valign="top" nowrap>[% HTML.escape(var.description) %]</th>
+      <td valign="top">[% var.HTML_CODE %]</td>
+     </tr>
+     [%- END %]
+     [%- END %]
+
     </table>
 
-    <input type="submit" id="delete_contact" name="action" value="[% 'Delete Contact' | $T8 %]" [% IF cp_used %]'disabled'[% END %]>
+[% IF cp_id %]
+    <input type="submit" id="delete_contact" name="action" value="[% 'Delete Contact' | $T8 %]">
+[% END %]
 
     <br style="clear: left" />