<body> entfernt.
[kivitendo-erp.git] / templates / webpages / ct / form_header.html
index 81c2eea..43f64b0 100644 (file)
@@ -1,10 +1,11 @@
 [%- USE T8 %]
 [% USE HTML %][% USE LxERP %]
 [% USE L %]
-<body>
 
  <h1>[% title %]</h1>
 
+ [% PROCESS 'common/flash.html' %]
+
  <form method="post" name="ct" action="ct.pl" >
 
   <ul id="maintab" class="shadetabs">
@@ -15,7 +16,7 @@
    <li><a href="#" rel="deliveries">[% 'Supplies' | $T8 %]</a></li>
 [%- END %]
    <li><a href="#" rel="vcnotes">[% 'Notes' | $T8 %]</a></li>
-   [%- IF CUSTOM_VARIABLES.size %]
+   [%- IF CUSTOM_VARIABLES.CT.size %]
    <li><a href="#" rel="custom_variables">[% 'Custom Variables' | $T8 %]</a></li>
    [%- END %]
   </ul>
 
      <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>
       [% ELSE %][% 'Homepage' | $T8 %]
       [% END %]
       </th>
-      <td><input name="homepage" size="45" title="[% 'Example: http://lx-office.org' | $T8 %]" value="[% HTML.escape(homepage) %]"></td>
+      <td><input name="homepage" size="45" title="[% 'Example: http://kivitendo.de' | $T8 %]" value="[% HTML.escape(homepage) %]"></td>
      </tr>
 
      <tr>
       <td><input name="iban" size="10" maxlength="100" value="[% HTML.escape(iban) %]"></td>
       <th align="right">[% 'BIC' | $T8 %]</th>
       <td><input name="bic" size="10" maxlength="100" value="[% HTML.escape(bic) %]"></td>
+      [%- IF ALL_CURRENCIES.size %]
+        <th align="right">[% 'Currency' | $T8 %]</th>
+        <td>[% L.select_tag('currency', ALL_CURRENCIES, default = currency, with_empty = 1) %]</td>
+      [%- END %]
      </tr>
 
      <tr>
       </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 %]
      </tr>
+
+     <tr>
+      <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>
 
    <div id="shipto" class="tabcontent">
     [% INCLUDE 'ct/_shipto.html' %]
-
-    <input type="submit" id="delete_shipto" name="action" value="[% 'Delete Shipto' | $T8 %]" disabled>
-    <br style="clear: left" />
    </div>
 
    <div id="contacts" class="tabcontent">
     [% INCLUDE 'ct/_contact.html' %]
-
-    <input type="submit" id="delete_contact" name="action" value="[% 'Delete Contact' | $T8 %]" disabled>
-    <br style="clear: left" />
    </div>
 
    <div id="deliveries" class="tabcontent">
      <tr>
       <th align="right">[% 'Shipping Address' | $T8 %]</th>
       <td colspan="3">
-       [% L.select_tag('delivery_id', L.options_for_select(SHIPTO_ALL, title_sub => \shipto_label, with_empty => 1),
-                       onchange => "\$('#delivery').load('ct.pl?action=get_delivery&id=' + \$('#cvid').attr('value') + '&db=' + \$('#db').attr('value') + '&shipto_id=' + this.value)") %]
+       [% L.select_tag('delivery_id', SHIPTO_ALL, title_sub = \shipto_label, with_empty = 1,
+                       onchange = "\$('#delivery').load('ct.pl?action=get_delivery&id=' + \$('#cvid').attr('value') + '&db=' + \$('#db').attr('value') + '&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>
 
       <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>
 
     <br style="clear: left" />
    </div>
 
-   [%- IF CUSTOM_VARIABLES.size %]
+   [%- IF CUSTOM_VARIABLES.CT.size %]
    <div id="custom_variables" class="tabcontent">
 
     <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>