From: Jean-André Santoni Date: Wed, 2 Dec 2009 13:03:33 +0000 (+0100) Subject: [MT2338] Prevents users to check 'active' with a currency different from 1 X-Git-Tag: v3.02.00-alpha~45^2~133 X-Git-Url: http://git.rot13.org/?a=commitdiff_plain;h=cbf9c7497fcd4c879d2d60d885ce7edc5d1828e2;p=koha.git [MT2338] Prevents users to check 'active' with a currency different from 1 --- 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 650b099451..49bf9c46fb 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'); + } + }); }); //]]>