Merge branch 'b-3.6.1' of ../kivitendo-erp_20220811
[kivitendo-erp.git] / templates / webpages / client_config / form.html
index 0f85512..79c2cdd 100644 (file)
@@ -38,30 +38,62 @@ function enable_template_controls() {
   $('#new_templates,#new_master_templates').prop('disabled', existing);
 }
 
+function verifyMBSize(elem) {
+  var fsize = parseInt($('#doc_max_filesize_MB').val());
+  $('#defaults_doc_max_filesize').val(fsize*1000000.0);
+  $('#doc_max_filesize_MB').val(fsize);
+}
+
+function verifyRootPath(elem) {
+  if ( elem.value == "" ) {
+    elem.value="./documents";
+  }
+}
+
+function checkavailable_filebackend(elem) {
+  var selval = elem.value;
+  if ( selval == 'Webdav' && $("#defaults_doc_webdav").val() == 0 ) {
+     elem.value = 'Filesystem';
+  }
+  if ( elem.value == 'Filesystem' && $("#defaults_doc_files").val() == 0 ) {
+     elem.value = 'None';
+  }
+  return false;
+}
+
 $(function() {
   warehouse_selected([% SELF.defaults.warehouse_id || -1 %], [% SELF.defaults.bin_id || -1 %], 'bin_id');
   warehouse_selected([% SELF.defaults.warehouse_id_ignore_onhand || -1 %], [% SELF.defaults.bin_id_ignore_onhand || -1 %], 'bin_id_ignore_onhand');
+  warehouse_selected([% SELF.defaults.stocktaking_warehouse_id || -1 %], [% SELF.defaults.stocktaking_bin_id || -1 %], 'stocktaking_bin_id');
 
   enable_template_controls();
+  $('#doc_max_filesize_MB').val(parseInt($('#defaults_doc_max_filesize').val())/1000000.0);
   $('#use_templates_existing,#use_templates_new').change(enable_template_controls);
 })
     -->
  </script>
 <h1>[% title | html %]</h1>
 
-[% PROCESS 'common/flash.html' %]
+[% INCLUDE 'common/flash.html' %]
 
-<form action='controller.pl' method='POST'>
+<form action='controller.pl' method='POST' id='form'>
  <div class="tabwidget">
   <ul>
    <li><a href="#miscellaneous">[% LxERP.t8('Miscellaneous') %]</a></li>
    <li><a href="#ranges_of_numbers">[% LxERP.t8('Ranges of numbers') %]</a></li>
    <li><a href="#default_accounts">[% LxERP.t8('Default Accounts') %]</a></li>
    <li><a href="#posting_configuration">[% LxERP.t8('Posting Configuration') %]</a></li>
-   <li><a href="#datev_check_configuration">[% LxERP.t8('DATEV check configuration') %]</a></li>
+   [% IF FORM.feature_datev %]
+     <li><a href="#datev_check_configuration">[% LxERP.t8('DATEV configuration') %]</a></li>
+   [% END %]
    <li><a href="#orders_deleteable">[% LxERP.t8('Orders / Delivery Orders deleteable') %]</a></li>
+[%- IF INSTANCE_CONF.get_doc_storage %]
+   <li><a href="#attachments">[% LxERP.t8('Global Attachments') %]</a></li>
+[%- END %]
    <li><a href="#warehouse">[% LxERP.t8('Warehouse') %]</a></li>
    <li><a href="#features">[% LxERP.t8('Features') %]</a></li>
+   <li><a href="#stocktaking">[% LxERP.t8('Stocktaking') %]</a></li>
+   <li><a href="#record_links">[% LxERP.t8('Linked Records') %]</a></li>
   </ul>
 
 [% PROCESS 'client_config/_ranges_of_numbers.html' %]
@@ -69,13 +101,13 @@ $(function() {
 [% PROCESS 'client_config/_posting_configuration.html' %]
 [% PROCESS 'client_config/_datev_check_configuration.html' %]
 [% PROCESS 'client_config/_orders_deleteable.html' %]
+[%- IF INSTANCE_CONF.get_doc_storage %]
+[% PROCESS 'client_config/_attachments.html' %]
+[%- END %]
 [% PROCESS 'client_config/_warehouse.html' %]
 [% PROCESS 'client_config/_features.html' %]
+[% PROCESS 'client_config/_stocktaking.html' %]
+[% PROCESS 'client_config/_record_links.html' %]
 [% PROCESS 'client_config/_miscellaneous.html' %]
-
- <div>
-  [%- L.hidden_tag('action',  'ClientConfig/dispatch')  %]
-  [%- L.submit_tag('action_save',  LxERP.t8('Save'))  %]
  </div>
-
 </form>