Bug 8119 - Show hint when disabling active currency checkbox

Display a hint when the exchange rate != 1.0: "The active currency
must have a rate of 1.0"

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Shari Perkins <dear.shari+koha@gmail.com>
This commit is contained in:
Owen Leonard 2012-05-18 09:19:34 -04:00 committed by Paul Poulain
parent b0b6268a9e
commit a4146dcbb1
1 changed files with 3 additions and 0 deletions

View File

@ -41,9 +41,11 @@
$("#rate").keyup(function() {
if ( $(this).val() == 1.0 ) {
$("#active").removeAttr('disabled');
$("#hint").html("");
} else {
$("#active").removeAttr('checked');
$("#active").attr('disabled','disabled');
$("#hint").html(_("The active currency must have a rate of 1.0"));
}
});
});
@ -114,6 +116,7 @@
[% ELSE %]
<input type="checkbox" id="active" name="active" value="1" />
[% END %]
<span id="hint" class="hint"></span>
</li>
</ol>