[MT2338] Prevents users to check 'active' with a currency different from 1
authorJean-André Santoni <jeanandre.santoni@biblibre.com>
Wed, 2 Dec 2009 13:03:33 +0000 (14:03 +0100)
committerHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Sun, 20 Dec 2009 13:31:12 +0000 (14:31 +0100)
koha-tmpl/intranet-tmpl/prog/en/modules/admin/currency.tmpl

index 650b099..49bf9c4 100644 (file)
 
     $(document).ready(function() {
         new YAHOO.widget.Button("newcurrency");
+
+        // prevents users to check active with a currency != 1
+        $("#rate").keyup(function() {
+            if ( $(this).val() == 1.0 ) {
+                $("#active").removeAttr('disabled');
+            } else {
+                $("#active").removeAttr('checked');
+                $("#active").attr('disabled','disabled');
+            }
+        });
     });
 //]]>
 </script>