]> wagnertech.de Git - mfinanz.git/blobdiff - templates/webpages/letter/edit.html
customernotes auch als notes Form Variable(fixmaster)
[mfinanz.git] / templates / webpages / letter / edit.html
index a43f310af68d0bc537f3bbbec7e5dfe4590b3fc2..390efcc17b7a4556f51bfb84aa9858cc76716dd1 100644 (file)
@@ -3,6 +3,7 @@
 [%- USE L %]
 [%- USE P %]
 [%- USE LxERP %]
+[%- SET WEBDAV = SELF.webdav_objects %]
 <h1>[% title | html %]</h1>
 
 <form action='controller.pl' method='POST'>
   <input type="hidden" name="draft.id" value="[% draft.id | html %]">
   <input type="hidden" name="type" value="[% type | html %]">
 
-  [%- PROCESS 'common/flash.html' %]
+  [%- INCLUDE 'common/flash.html' %]
+
+  <div id="oe_tabs" class="tabwidget">
+   <ul>
+    <li><a href="#ui-tabs-letter">[% LxERP.t8("Letter") %]</a></li>
+[%- IF letter.id %]
+ [%- IF INSTANCE_CONF.get_webdav %]
+     <li><a href="#ui-tabs-webdav">[% LxERP.t8('WebDAV') %]</a></li>
+ [%- END %]
+    <li><a href="controller.pl?action=RecordLinks/ajax_list&object_model=Letter&object_id=[% HTML.url(letter.id) %]">[% LxERP.t8("Linked Records") %]</a></li>
+[%- END %]
+   </ul>
+
+   <div id="ui-tabs-letter">
 
 <table width=100%>
 <tr>
@@ -19,7 +33,7 @@
    <table width=90%>
     <tr>
      <th align='right'>[% 'Customer' | $T8 %]:</th>
-     <td>[% P.customer_vendor_picker('letter.vc_id', letter.vc_id, type='customer') %]
+     <td>[% P.customer_vendor_picker('letter.customer_id', letter.customer_id, type='customer') %]
 [%- IF letter.customer_id %]
       <input type="button" value="[% 'Details (one letter abbreviation)' | $T8 %]" onclick="show_vc_details('customer')">
 [%- END %]
@@ -27,7 +41,7 @@
     </tr>
     <tr>
      <th align='right'>[% 'Contact Person' | $T8 %]</th>
-     <td>[% L.select_tag('letter.cp_id', letter.cp_id ? letter.customer.contacts : [], value_key='cp_id', title_key='full_name', default=letter.cp_id) %]</td>
+     <td>[% L.select_tag('letter.cp_id', letter.customer_id ? letter.customer.contacts : [], value_key='cp_id', title_key='full_name', default=letter.cp_id) %]</td>
     </tr>
     <tr>
      <th align='right'>[% 'Your Reference' | $T8 %]:</th>
 </tr>
 </table>
 
+ </div>
+ [% PROCESS 'webdav/_list.html' %]
+ <div id="ui-tabs-1">
+  [%- LxERP.t8("Loading...") %]
+ </div>
+</div>
+
 <input type="hidden" name="action" value="Letter/dispatch">
 <input class="submit" type="submit" name="action_update" id="update_button" value="[% 'Update' | $T8 %]">
 
 [%- IF letter.letternumber %]
+  <input class="submit" type="submit" name="action_edit_email" value="[% 'E-mail' | $T8 %]">
   <input class="submit" type="submit" name="action_print_letter" value="[% 'Print' | $T8 %]">
 [% END %]
 
 
 <script type='text/javascript'>
   $(function(){
-    $('#letter_vc_id').change(function(){
+    $('#letter_customer_id').change(function(){
       var data = $('form').serializeArray();
       data.push({ name: 'action_update_contacts', value: 1 });
       $.post('controller.pl', data, kivi.eval_json_result);