Simple Übergaben von globals an templates in templates verschoben
[kivitendo-erp.git] / templates / webpages / ic / form_header.html
index d1d80c3..d9d635b 100644 (file)
@@ -1,10 +1,8 @@
 [%- USE T8 %]
 [%- USE HTML %]
-[%- USE LxERP %]
- <script type="text/javascript" src="js/common.js"></script>
- <script type="text/javascript" src="js/parts_language_selection.js"></script>
-
- <p><div class="listtop">[% title %]  [% HTML.escape(partnumber) %]  [% HTML.escape(description) %]</div></p>
+[%- USE LxERP %][%- USE L -%][%- USE P -%]
+[% PROCESS 'common/select_warehouse_bin.html' %]
+ <h1>[% title %]  [% HTML.escape(partnumber) %]  [% HTML.escape(description) %]</h1>
 
 [% PROCESS 'common/flash.html' %]
 
   <input name="taxaccounts" type="hidden" value="[% HTML.escape(taxaccounts) %]">
   <input name="rowcount" type="hidden" value="[% HTML.escape(rowcount) %]">
   <input name="eur" type="hidden" value="[% HTML.escape(eur) %]">
-  <input name="language_values" type="hidden" value="[% HTML.escape(language_values) %]">
   <input name="original_partnumber" type="hidden" value="[% HTML.escape(original_partnumber) %]">
   <input name="currow" type="hidden" value="[% HTML.escape(currow) %]">
 
-  <div class="tabwidget">
+  <div id="ic_tabs" class="tabwidget">
    <ul>
     <li><a href="#master_data">[% 'Basic Data' | $T8 %]</a></li>
+[% IF LANGUAGES.size %]
+    <li><a href="#translations_tab">[% 'Translations' | $T8 %]</a></li>
+[% END %]
     [%- IF id %]
     <li><a href="#sales_price_information">[% 'Price information' | $T8 %]</a></li>
     [%- END %]
     [%- IF CUSTOM_VARIABLES.size %]
     <li><a href="#custom_variables">[% 'Custom Variables' | $T8 %]</a></li>
     [%- END %]
+    [%- IF id  %]
+    <li><a href="#price_rules">[% 'Price Rules' | $T8 %]</a></li>
+    [% END %]
    </ul>
 
   <div id="master_data">
@@ -43,8 +46,8 @@
       <table width="100%">
        <tr valign="top">
         <td>
-[%- IF image && conf_parts_show_image %]
-         <a href="[% image | html %]" target="_blank"><img style="[% conf_parts_image_css %]" src="[% image | html %]"/></a>
+[%- IF image && INSTANCE_CONF.get_parts_show_image %]
+         <a href="[% image | html %]" target="_blank"><img style="[% INSTANCE_CONF.get_parts_image_css %]" src="[% image | html %]"/></a>
 [%- END %]
 
          <table>
@@ -53,7 +56,7 @@
             <table>
              <tr>
               <th align="right">[% 'Part Number' | $T8 %]</th>
-              <td><input id='partnumber' name="partnumber" value="[% HTML.escape(partnumber) %]" size="40"></td>
+              <td><input id='partnumber' name="partnumber" value="[% HTML.escape(partnumber) %]" size="40" class="initial_focus"></td>
              </tr>
              <tr>
               <th align="right">[% 'Part Description' | $T8 %]</th>
            </td>
           </tr>
 
-          <tr>
-           <td>
-            <button type="button" onclick="parts_language_selection_window('language_values')">[% 'Set Language Values' | $T8 %]</button>
-           </td>
-          </tr>
-
           <tr height="5"></tr>
 
           <tr>
               <th align="left">[% 'Part Notes' | $T8 %]</th>
               <th align="left">[% 'Formula' | $T8 %]</th>
              </tr>
-             <tr>
+             <tr valign="top">
               <td>
-               <textarea name="notes" rows="[% HTML.escape(notes_rows) %]" cols="45" wrap="soft">[% HTML.escape(notes) %]</textarea>
+               [% L.textarea_tag("notes", P.restricted_html(notes), class="texteditor", style="width: 600px; height: 200px") %]
               </td>
               <td>
-               <ilayer>
-                <layer onmouseover="this.T_STICKY=true;this.T_STATIC=true;return escape('[% 'The formula needs the following syntax:<br>For regular article:<br>Variablename= Variable Unit;<br>Variablename2= Variable2 Unit2;<br>...<br>###<br>Variable + ( Variable2 / Variable )<br><b>Please be beware of the spaces in the formula</b><br>' | $T8 %]')">
-                 <textarea name="formel" rows="[% HTML.escape(notes_rows) %]" cols="30" wrap="soft">[% HTML.escape(formel) %]</textarea></layer></ilayer>
+                 <textarea name="formel" rows="[% HTML.escape(notes_rows) %]" cols="30" wrap="soft" class="tooltipster-html" title="[% 'The formula needs the following syntax:<br>For regular article:<br>Variablename= Variable Unit;<br>Variablename2= Variable2 Unit2;<br>...<br>###<br>Variable + ( Variable2 / Variable )<br><b>Please be beware of the spaces in the formula</b><br>' | $T8 %]">[% HTML.escape(formel) %]</textarea>
                </td>
              </tr>
             </table>
             [% HTML.escape(defaults.weightunit) %]
            </td>
           </tr>
+        [%- END %]
           <tr>
            <th align="right" nowrap>[% 'On Hand' | $T8 %]</th>
            <th align="left" nowrap class="plus[% IF onhand > 0 %]1[% ELSE %]0[% END %]">&nbsp;[% LxERP.format_amount(onhand) %]</th>
            <td><input name="rop" size="10" value="[% LxERP.format_amount(rop) %]"></td>
           </tr>
           <tr>
-           <th align="right" nowrap="true">[% 'Bin' | $T8 %]</th>
-           <td><input name="bin" size="10" value="[% HTML.escape(bin) %]"></td>
+           <th align="right" nowrap="true">[% 'Default Warehouse' | $T8 %]</th>
+           <td>
+            <select name="warehouse_id" onchange="warehouse_selected(warehouses[this.selectedIndex]['id'], 0)">
+             [%- FOREACH warehouse = WAREHOUSES %]
+               <option value="[% HTML.escape(warehouse.id) %]"[% IF warehouse_id == warehouse.id %] selected[% END %]>[% warehouse.description %]</option>
+             [%- END %]
+            </select>
+          </td>
+          </tr>
+          <tr>
+           <th align="right" nowrap="true">[% 'Default Bin' | $T8 %]</th>
+           <td><select id="bin_id" name="bin_id"></select></td>
           </tr>
-        [%- END %]
           <tr>
            <th align="right" nowrap="true">[% 'Verrechnungseinheit' | $T8 %]</th>
            <td><input name="ve" size="10" value="[% HTML.escape(ve) %]"></td>