kivi.Validator: In IS Maske als check registriert
[kivitendo-erp.git] / templates / webpages / is / form_header.html
index 1f89639..310508b 100644 (file)
@@ -8,16 +8,16 @@
 <script type="text/javascript" src="js/calculate_qty.js"></script>
 <script type="text/javascript" src="js/follow_up.js"></script>
 
-<form method="post" name="invoice" action="[% script %]">
+<form method="post" id='form' name="invoice" action="[% script %]">
 
 [%- FOREACH key = HIDDENS %]
-<input type="hidden" name="[% HTML.escape(key) %]" value="[% HTML.escape($key)  %]">
+<input type="hidden" name="[% HTML.escape(key) %]" id="[% HTML.escape(key) %]" value="[% HTML.escape($key)  %]">
 [%- END %]
-<input type="hidden" name="follow_up_trans_id_1" value="[% id %]">
-<input type="hidden" name="follow_up_trans_type_1" value="sales_invoice">
-<input type="hidden" name="follow_up_trans_info_1" value="[% HTML.escape(follow_up_trans_info) %]">
-<input type="hidden" name="follow_up_rowcount" value="1">
-<input type="hidden" name="lastmtime" value="[% HTML.escape(lastmtime) %]">
+<input type="hidden" name="follow_up_trans_id_1" id="follow_up_trans_id_1" value="[% id %]">
+<input type="hidden" name="follow_up_trans_type_1" id="follow_up_trans_type_1" value="sales_invoice">
+<input type="hidden" name="follow_up_trans_info_1" id="follow_up_trans_info_1" value="[% HTML.escape(follow_up_trans_info) %]">
+<input type="hidden" name="follow_up_rowcount" id="follow_up_rowcount" value="1">
+<input type="hidden" name="lastmtime" id="lastmtime" value="[% HTML.escape(lastmtime) %]">
 
 <h1>[% title %]</h1>
 
         <tr>
           <th align="right">[% 'Customer' | $T8 %]</th>
           <td>
-           [% P.customer_vendor_picker("customer_id", customer_id, type="customer", style="width: 250px", class="initial_focus") %]
+           [% P.customer_vendor_picker("customer_id", customer_id, type="customer", style="width: 250px", class="initial_focus", onchange="\$('#update_button').click()") %]
            [% L.button_tag("show_vc_details('customer')", LxERP.t8('Details (one letter abbreviation)')) %]
            [% L.hidden_tag("previous_customer_id", customer_id) %]
-          <input type="hidden" name="customer_pricegroup_id" value="[% HTML.escape(customer_pricegroup_id) %]">
+           [% L.hidden_tag("customer_pricegroup_id", customer_pricegroup_id) %]
           </td>
         </tr>
 [%- IF ALL_CONTACTS.size %]
           </td>
         </tr>
 [%- END %]
-[%- IF ALL_SHIPTO.size %]
         <tr>
           <th align="right">[% 'Shipping Address' | $T8 %]</th>
           <td>
+           [%- IF ALL_SHIPTO.size %]
             [% shiptos = [ [ "", LxERP.t8("No/individual shipping address") ] ] ;
                L.select_tag('shipto_id', shiptos.import(ALL_SHIPTO), default=shipto_id, value_key='shipto_id', title_key='displayable_id', style='width: 250px') %]
+           [%- END %]
+           [% L.button_tag("kivi.SalesPurchase.edit_custom_shipto()", LxERP.t8("Custom shipto")) %]
           </td>
         </tr>
-[%- END %]
         <tr>
           <td align="right">[% 'Credit Limit' | $T8 %]</td>
           <td>
         </tr>
         <tr>
           <th align="right">[% 'Transaction description' | $T8 %]</th>
-          <td colspan="3"><input size='35' name="transaction_description" id="transaction_description" value="[% HTML.escape(transaction_description) %]"></td>
+          <td colspan="3">[% L.input_tag("transaction_description", transaction_description, size=35, "data-validate"=INSTANCE_CONF.get_require_transaction_description_ps ? 'required' : '') %]</td>
         </tr>
       </table>
     </td>
 [%- IF is_type_credit_note %]
         <tr>
           <th align="right" nowrap>[% 'Credit Note Number' | $T8 %]</th>
-          <td colspan="3"><input size='11' name="invnumber" value="[% HTML.escape(invnumber) %]"></td>
+          <td colspan="3"><input size='11' name="invnumber" id="invnumber" value="[% HTML.escape(invnumber) %]"></td>
         </tr>
         <tr>
           <th align="right" nowrap>[% 'Invoice Number' | $T8 %]</th>
-          <td colspan="3"><input size='11' name="invnumber_for_credit_note" value="[% HTML.escape(invnumber_for_credit_note) %]"></td>
+          <td colspan="3"><input size='11' name="invnumber_for_credit_note" id="invnumber_for_credit_note" value="[% HTML.escape(invnumber_for_credit_note) %]"></td>
         </tr>
         <tr>
           <th align="right">[% 'Credit Note Date' | $T8 %]</th>
 [%- ELSE %]
         <tr>
           <th align="right" nowrap>[% 'Invoice Number' | $T8 %]</th>
-          <td colspan="3"><input size='11' name="invnumber" value="[% HTML.escape(invnumber) %]"></td>
+          <td colspan="3"><input size='11' name="invnumber" id="invnumber" value="[% HTML.escape(invnumber) %]"></td>
         </tr>
         <tr>
           <th align="right">[% 'Invoice Date' | $T8 %]</th>
         </tr>
         <tr>
         <th align="right" nowrap>[% 'Delivery Order Number' | $T8 %]</th>
-          <td colspan="3"><input size='11' name="donumber" value="[% HTML.escape(donumber) %]"></td>
+          <td colspan="3"><input size='11' name="donumber" id="donumber" value="[% HTML.escape(donumber) %]"></td>
         </tr>
 [%- END %]
         <tr>
         </tr>
         <tr>
           <th align="right" nowrap>[% 'Order Number' | $T8 %]</th>
-          <td colspan="3"><input size='11' name="ordnumber" value="[% HTML.escape(ordnumber) %]"></td>
+          <td colspan="3"><input size='11' name="ordnumber" id="ordnumber" value="[% HTML.escape(ordnumber) %]"></td>
         </tr>
         <tr>
           <th align="right" nowrap>[% 'Order Date' | $T8 %]</th>
         </tr>
         <tr>
           <th align="right" nowrap>[% 'Quotation Number' | $T8 %]</th>
-          <td colspan="3"><input size='11' name="quonumber" value="[% HTML.escape(quonumber) %]"></td>
+          <td colspan="3"><input size='11' name="quonumber" id="quonumber" value="[% HTML.escape(quonumber) %]"></td>
         </tr>
         <tr>
           <th align="right" nowrap>[% 'Quotation Date' | $T8 %]</th>
         </tr>
         <tr>
           <th align="right" nowrap>[% 'Customer Order Number' | $T8 %]</th>
-          <td colspan="3"><input size='11' name="cusordnumber" value="[% HTML.escape(cusordnumber) %]"></td>
+          <td colspan="3"><input size='11' name="cusordnumber" id="cusordnumber" value="[% HTML.escape(cusordnumber) %]"></td>
         </tr>
         <tr>
           <th align="right" nowrap>[% 'Project Number' | $T8 %]</th>
 [% IF resubmit && is_format_html %]
        window.open('about:blank','Beleg');
        document.invoice.target = 'Beleg';
-       $('#action_print').click();
+       kivi.SalesPurchase.show_print_dialog();
+       kivi.SalesPurchase.print_record();
 [% ELSIF resubmit %]
-       $('#action_print').click();
+       kivi.SalesPurchase.show_print_dialog();
+       kivi.SalesPurchase.print_record();
 [% ELSIF creditwarning != '' %]
        alert('[% 'Credit Limit exceeded!!!' | $T8 %]');
 [% ELSE %]