]> wagnertech.de Git - kivitendo-erp.git/blobdiff - templates/webpages/ct/_contact.html
Leeres Feld mit anzeigen heißt with_empty bei select_tag im L-Plugin.
[kivitendo-erp.git] / templates / webpages / ct / _contact.html
index 8da17e9cbdd550231695fcefd0ae3fb88de1953b..1c24fe1d4818479bb1700ac501c20a3e417853a5 100644 (file)
@@ -1,11 +1,11 @@
 [% USE L %][% USE HTML %][% USE T8 %][% USE LxERP %]
-    <table id="contact_table">
+    <table>
      <input type="hidden" name="cp_id" value="[% HTML.escape(cp_id) %]">
      <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 => "\$('#contact_table').load('ct.pl?action=get_contact&id=' + \$('#cvid').attr('value') + '&db=' + \$('#db').attr('value') + '&cp_id=' + \$('#cp_id').attr('value'))") %]
+                        onchange => "\$('#contacts').load('ct.pl?action=get_contact&id=' + \$('#cvid').attr('value') + '&db=' + \$('#db').attr('value') + '&cp_id=' + \$('#cp_id').attr('value'))") %]
       </td>
      </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>
+
+[% IF cp_id %]
+    <input type="submit" id="delete_contact" name="action" value="[% 'Delete Contact' | $T8 %]">
+[% END %]
+
+    <br style="clear: left" />