Generische Unterstützung für CTI: Click-to-dial
[kivitendo-erp.git] / templates / webpages / customer_vendor / tabs / shipto.html
index ef20e7f..ded32f3 100644 (file)
@@ -16,7 +16,7 @@
              title_key = 'displayable_id',
              with_empty = 1,
              empty_title = LxERP.t8('New shipto'),
-             onchange = "namespace('kivi.CustomerVendor').selectShipto();"
+             onchange = "kivi.CustomerVendor.selectShipto({onFormSet: function(){ shiptoMapWidget.testInputs(); local_reinit_widgets(); }});",
            )
         %]
       </td>
       <td>
         [% L.input_tag('shipto.shiptostreet', SELF.shipto.shiptostreet,  size = 35, maxlength = 75) %]
 
-        <a href="#" onclick="namespace('kivi.CustomerVendor').showMap('shipto_shipto');" title="[% 'Map' | $T8 %]">
-          <img src="image/map.png" alt="[% 'Map' | $T8 %]" />
-        </a>
+        <span id="shipto_map"></span>
+        <script type="text/javascript">
+          shiptoMapWidget = new kivi.CustomerVendor.MapWidget('shipto_shipto');
+          $(function() {
+            shiptoMapWidget.render($('#shipto_map'));
+          });
+        </script>
       </td>
     </tr>
 
@@ -55,7 +59,7 @@
       <th align="right" nowrap>[% 'Zipcode' | $T8 %]/[% 'City' | $T8 %]</th>
 
       <td>
-        [% L.input_tag('shipto.shiptozipcode', SELF.shipto.shiptostreet,  size = 5, maxlength = 75) %]
+        [% L.input_tag('shipto.shiptozipcode', SELF.shipto.shiptozipcode,  size = 5, maxlength = 75) %]
         [% L.input_tag('shipto.shiptocity', SELF.shipto.shiptocity,  size = 30, maxlength = 75) %]
       </td>
     </tr>