[Koha-patches] [PATCH 06/92] [MT2338] Prevents users to check 'active' with a currency different from 1

Henri-Damien LAURENT henridamien.laurent at biblibre.com
Tue Dec 22 01:19:59 CET 2009


From: Jean-André Santoni <jeanandre.santoni at biblibre.com>

---
 .../prog/en/modules/admin/currency.tmpl            |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/currency.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/currency.tmpl
index 650b099..49bf9c4 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/currency.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/currency.tmpl
@@ -37,6 +37,16 @@
 
     $(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>
-- 
1.6.3.3




More information about the Koha-patches mailing list