View | Details | Raw Unified | Return to bug 8119
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/currency.tt (-9 / +13 lines)
Lines 34-53 Link Here
34
        }
34
        }
35
    }
35
    }
36
36
37
    function check_currency(val) {
38
        if ( val == 1.0 ) {
39
            $("#active").removeAttr('disabled');
40
            $("#hint").html("");
41
        } else {
42
            $("#active").removeAttr('checked');
43
            $("#active").attr('disabled','disabled');
44
            $("#hint").html(_("The active currency must have a rate of 1.0"));
45
        }
46
    }
47
37
    $(document).ready(function() {
48
    $(document).ready(function() {
38
        new YAHOO.widget.Button("newcurrency");
49
        new YAHOO.widget.Button("newcurrency");
39
50
40
        // prevents users to check active with a currency != 1
51
        // prevents users to check active with a currency != 1
41
        $("#rate").keyup(function() {
52
        $("#rate").keyup(function() {
42
            if ( $(this).val() == 1.0 ) {
53
            check_currency( $(this).val() );
43
                $("#active").removeAttr('disabled');
44
                $("#hint").html("");
45
            } else {
46
                $("#active").removeAttr('checked');
47
                $("#active").attr('disabled','disabled');
48
                $("#hint").html(_("The active currency must have a rate of 1.0"));
49
            }
50
        });
54
        });
55
        check_currency( $("#rate").val() );
51
    });
56
    });
52
//]]>
57
//]]>
53
</script>
58
</script>
54
- 

Return to bug 8119