Merge branch 'master' of github.com:kivitendo/kivitendo-erp
authorJan Büren <jan@kivitendo-premium.de>
Fri, 15 Mar 2013 12:53:16 +0000 (13:53 +0100)
committerJan Büren <jan@kivitendo-premium.de>
Fri, 15 Mar 2013 12:53:16 +0000 (13:53 +0100)
bin/mozilla/am.pl
templates/webpages/am/edit_tax.html

index bcb39d2..68f8e16 100644 (file)
@@ -1491,11 +1491,7 @@ sub edit_tax {
 
   $form->header();
 
-  #set readonly if the there are entries in acc_trans with the tax
-  my $readonly = $form->{tax_already_used} ? 'readonly' : '';
-
   my $parameters_ref = {
-    readonly => $readonly, 
   };
 
   # Ausgabe des Templates
index e153d2f..69ac744 100644 (file)
@@ -9,7 +9,10 @@
   <table width="100%">
    <tr>
     <td>[% 'tax_taxkey' | $T8 %]</td>
-    <td><input name="taxkey" size="2" value="[% HTML.escape(taxkey) %]" [% readonly %]></td>
+    <td>[% IF tax_already_used %]<p>[% HTML.escape(taxkey) %]</p>
+        <input type="hidden" name="taxkey" size="2" value="[% HTML.escape(taxkey) %]">
+        [% ELSE %]<input name="taxkey" size="2" value="[% HTML.escape(taxkey) %]">
+        [% END %]</td>
    </tr>
 
    <tr>
 
    <tr>
     <td>[% 'tax_percent' | $T8 %]</td>
-    <td><input name="rate" size="10" value="[% HTML.escape(rate) %]" [% readonly %]> %</td>
+    <td>[% IF tax_already_used %]<p>[% HTML.escape(rate) %] %</p>
+        <input type="hidden" name="rate" size="10" value="[% HTML.escape(rate) %]">
+        [% ELSE %]<input name="rate" size="10" value="[% HTML.escape(rate) %]"> %
+        [% END %]</td>
    </tr>
 
    <tr>