EK-Rechnung: Bei Verbleib in der Maske nach Buchen Dokumenten-Tab laden
[kivitendo-erp.git] / templates / webpages / ir / form_header.html
index 7604566..680d2d1 100644 (file)
@@ -14,7 +14,7 @@
 <p>[% saved_message %]</p>
 
 [%- FOREACH key = HIDDENS %]
-<input type="hidden" name="[% HTML.escape(key) %]" value="[% HTML.escape($key)  %]">
+  [% L.hidden_tag(key, $key) %]
 [%- END %]
 <input type="hidden" name="follow_up_trans_id_1" value="[% id %]">
 <input type="hidden" name="follow_up_trans_type_1" value="purchase_invoice">
@@ -33,7 +33,7 @@
 [%- END %]
 [%- IF id %]
   [%- IF INSTANCE_CONF.get_doc_storage %]
-  <li><a href="controller.pl?action=File/list&file_type=document&object_type=purchase_invoice&object_id=[% HTML.url(id) %]">[% 'Documents' | $T8 %]</a></li>
+  <li><a href="#ui-tabs-docs">[% 'Documents' | $T8 %]</a></li>
   <li><a href="controller.pl?action=File/list&file_type=attachment&object_type=purchase_invoice&object_id=[% HTML.url(id) %]">[% 'Attachments' | $T8 %]</a></li>
   [%- END %]
   [%- IF AUTH.assert('record_links', 1) %]
 [%- END %]
  </ul>
 
+[%- IF INSTANCE_CONF.get_doc_storage %]
+  <div id="ui-tabs-docs"></div>
+[%- END %]
+
  <div id="ui-tabs-basic-data">
 <table width="100%">
   <tr>
 [% IF creditwarning != '' %]
        alert('[% 'Credit Limit exceeded!!!' | $T8 %]');
 [% END %]
+       kivi.File.doc_tab_init('ir_tabs', 'ui-tabs-docs', $('#id').val(), 'purchase_invoice');
      });
    //-->
   </script>