Merge branch 'b-3.6.1' of ../kivitendo-erp_20220811
[kivitendo-erp.git] / templates / webpages / shops / form.html
diff --git a/templates/webpages/shops/form.html b/templates/webpages/shops/form.html
new file mode 100644 (file)
index 0000000..2f08e72
--- /dev/null
@@ -0,0 +1,114 @@
+[%- USE HTML -%][%- USE LxERP -%][%- USE L -%][%- USE P -%][%- USE T8 -%]
+
+[% SET style="width: 400px" %]
+[% SET size=34 %]
+
+<h1>[% HTML.escape(title) %]</h1>
+<form id="form" action="controller.pl" method="post">
+
+[%- INCLUDE 'common/flash.html' %]
+
+[%- L.hidden_tag("id", SELF.shop.id) %]
+
+<table>
+  <tr>
+    <th align="right">[% 'Description' | $T8 %]</th>
+    <td>[%- L.input_tag("shop.description", SELF.shop.description, size=size) %]</td>
+  </tr>
+  <tr>
+    <th align="right">[% 'Shop type' | $T8 %]</th>
+    <td>[% L.select_tag('shop.connector', SELF.connectors, value_key = 'id', title_key = 'description', with_empty = 0, default = SELF.shop.connector, default_value_key='id' ) %]</td>
+  <tr>
+  <tr>
+    <th align="right">[% 'Price type' | $T8 %]</th>
+    <td>[% L.select_tag('shop.pricetype', SELF.price_types, value_key = 'id', title_key = 'name', with_empty = 0, default = SELF.shop.pricetype, default_value_key='id' ) %]</td>
+  </tr>
+  <tr>
+    <th align="right">[% 'Price Source' | $T8 %]</th>
+    <td>[% L.select_tag('shop.price_source', SELF.price_sources, value_key = 'id', title_key = 'name', with_empty = 0, default = SELF.shop.price_source, default_value_key='id' ) %]</td>
+  </tr>
+  <tr>
+    <th align="right">[% 'Bookinggroup/Tax' | $T8 %]</th>
+    <td>[% L.select_tag('shop.taxzone_id', SELF.taxzone_id, value_key = 'id', title_key = 'name', with_empty = 0, default = SELF.shop.taxzone_id, default_value_key='id' ) %]</td>
+  </tr>
+  <tr>
+    <th align="right">[% 'Protocol' | $T8 %]</th>
+    <td>[% L.select_tag('shop.protocol', SELF.protocols value_key = 'id', title_key = 'name', with_empty = 0, default = SELF.shop.protocol, default_value_key='id' ) %]</td>
+  </tr>
+  <tr>
+    <th align="right">[% 'Server' | $T8 %]</th>
+    <td>[%- L.input_tag("shop.server", SELF.shop.server, size=size) %]</td>
+  </tr>
+  <tr>
+    <th align="right">[% 'Port' | $T8 %]</th>
+    <td>[%- L.input_tag("shop.port", SELF.shop.port, size=5) %]</td>
+  </tr>
+  <tr>
+    <th align="right">[% 'Proxy' | $T8 %]</th>
+    <td>[%- L.input_tag("shop.proxy", SELF.shop.proxy, size=size) %]</td>
+  </tr>
+  <tr>
+    <th align="right">[% 'Path' | $T8 %]</th>
+    <td>[%- L.input_tag("shop.path", SELF.shop.path, size=size) %]</td>
+  </tr>
+  <tr>
+    <th align="right">[% 'Realm' | $T8 %]</th>
+    <td>[%- L.input_tag("shop.realm", SELF.shop.realm, size=size) %]</td>
+  </tr>
+  <tr>
+    <th align="right">[% 'User' | $T8 %]</th>
+    <td>[%- L.input_tag("shop.login", SELF.shop.login, size=size) %]</td>
+  </tr>
+  <tr>
+    <th align="right">[% 'Password' | $T8 %]</th>
+    <td>[%- L.input_tag("shop.password", SELF.shop.password, size=size) %]</td>
+  </tr>
+  <tr>
+    <th align="right">[% 'Last ordernumber' | $T8 %]</th>
+    <td>[%- L.input_tag("shop.last_order_number", SELF.shop.last_order_number, size=12) %]</td>
+  </tr>
+  <tr>
+    <th align="right">[% 'Orders to fetch' | $T8 %]</th>
+    <td>[%- L.input_tag("shop.orders_to_fetch", SELF.shop.orders_to_fetch, size=12) %]</td>
+  </tr>
+  <tr>
+    <th align="right">[% 'Transaction description' | $T8 %]</th>
+    <td>[%- L.input_tag("shop.transaction_description", SELF.shop.transaction_description, size=size) %]</td>
+  </tr>
+  <tr>
+    <th align="right">[% 'Default part for shipping costs' | $T8 %]</th>
+    <td>[%- P.part.picker('shop.shipping_costs_parts_id', SELF.shop.shipping_costs_parts_id, style="width: 300px") %]</td>
+  </tr>
+  <tr>
+    <th align="right">[% 'Obsolete' | $T8 %]</th>
+    <td>[% L.checkbox_tag('shop.obsolete', checked = SELF.shop.obsolete, for_submit=1) %]</td>
+  </tr>
+  <tr>
+    <th align="right">[% 'Use Long Description from Parts for Shop Long Description' | $T8 %]</th>
+    <td>[% L.yes_no_tag('shop.use_part_longdescription', SELF.shop.use_part_longdescription) %]</td>
+  </tr>
+</table>
+
+ <hr>
+
+<script type="text/javascript">
+<!--
+function check_prerequisites() {
+  if ($('#shop_description').val() === "") {
+    alert(kivi.t8('The name is missing.'));
+    return false;
+  }
+  if ($('#shop_url').val() === "") {
+    alert(kivi.t8('The URL is missing.'));
+    return false;
+  }
+  if ($('#shop_port').val() === "") {
+    alert(kivi.t8('The port is missing.'));
+    return false;
+  }
+
+  return true;
+}
+-->
+</script>
+</form>