Merge branch 'currency'
[kivitendo-erp.git] / templates / webpages / am / edit_accounts.html
index 1676424..38652b7 100644 (file)
@@ -8,19 +8,17 @@
 </script>
 
 <script type="text/javascript">
-window.onload = function() {
+$(function() {
     setupDependencies('EditAccount'); //name of form(s). Seperate each with a comma (ie: 'weboptions', 'myotherform' )
-  };
+});
 </script>
 
-<body>
 <form method="post" name="EditAccount" action="am.pl">
 
 <input type="hidden" name="id"                 value="[% HTML.escape(id) %]">
 <input type="hidden" name="type"               value="account">
 <input type="hidden" name="orphaned"           value="[% HTML.escape(orphaned) %]">
 <input type="hidden" name="new_chart_valid"    value="[% HTML.escape(new_chart_valid) %]">
-<input type="hidden" name="original_accno"    value="[% HTML.escape(accno) %]">
 <input type="hidden" name="inventory_accno_id" value="[% HTML.escape(inventory_accno_id) %]">
 <input type="hidden" name="income_accno_id"    value="[% HTML.escape(income_accno_id) %]">
 <input type="hidden" name="expense_accno_id"   value="[% HTML.escape(expense_accno_id) %]">
@@ -63,16 +61,18 @@ window.onload = function() {
       <td>
 [% IF AccountIsPosted %]
         [% L.select_tag('dummy_charttype',
-                        L.options_for_select(all_charttypes,
-                                             title => 'name', value => 'value',
-                                             default => selected_charttype),
+                        all_charttypes,
+                        title_key => 'name',
+                        value_key => 'value',
+                        default => selected_charttype,
                         disabled => '1') %]
         [% L.hidden_tag('charttype', selected_charttype) %]
 [% ELSE %]
         [% L.select_tag('charttype',
-                        L.options_for_select(all_charttypes,
-                                             title => 'name', value => 'value',
-                                             default => selected_charttype)) %]
+                        all_charttypes,
+                        title_key => 'name',
+                        value_key => 'value',
+                        default => selected_charttype) %]
 [% END %]
       </td>
     </tr>
@@ -199,7 +199,6 @@ window.onload = function() {
   <p style='font-weight:normal'>[% 'Note: Taxkeys must have a "valid from" date, and will not behave correctly without.' | $T8 %]</p>
 
             <table>
-[% IF account_exists %]
               <tr>
                 <th align="left">[% 'Taxkey' | $T8 %]</th>
                 <th align="left">[% 'valid from' | $T8 %]</th>
@@ -207,6 +206,7 @@ window.onload = function() {
                 <th align="left">[% 'delete' | $T8 %] ? </th>
               </tr>
 [% FOREACH tk = ACCOUNT_TAXKEYS %]
+
               <tr>
     [% IF tk.id %]
                 <input type="hidden" name="taxkey_id_[% tk.runningnumber %]" value="[% tk.id %]">
@@ -224,14 +224,9 @@ window.onload = function() {
     [% END %]
               </tr>
 
+
 [% END %]
-[% ELSE %]
-<tr>
-  <td align="center" colspan="4"><p>[% 'Save account first to insert taxkeys' | $T8 %]</p>
-  </td>
-</tr>
-[% END %]
-            </table>
+    </table>
 </fieldset>
 
 <fieldset class="DEPENDS ON charttype BEING A">