[MT2338] Prevents users to check 'active' with a currency different from 1

This commit is contained in:
Jean-André Santoni 2009-12-02 14:03:33 +01:00 committed by Henri-Damien LAURENT
parent ce673f13d9
commit cbf9c7497f
1 changed files with 10 additions and 0 deletions

View File

@ -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>