Some extra code for #1376

This commit is contained in:
James Cole
2020-03-26 07:10:39 +01:00
parent 84bdd47109
commit ee5a4caaab
3 changed files with 37 additions and 1 deletions

View File

@@ -21,4 +21,22 @@
$(function () {
"use strict";
$(".content-wrapper form input:enabled:visible:first").first().focus().select();
$('#ffInput_auto_budget_type').change(updateAutoBudget);
function updateAutoBudget() {
var value = parseInt($('#ffInput_auto_budget_type').val());
if (0 === value) {
$('#ffInput_auto_budget_currency_id').prop('disabled', true);
$('#ffInput_auto_budget_amount').prop('disabled', true);
$('#ffInput_auto_budget_period').prop('disabled', true);
return;
}
$('#ffInput_auto_budget_currency_id').prop('disabled', false);
$('#ffInput_auto_budget_amount').prop('disabled', false);
$('#ffInput_auto_budget_period').prop('disabled', false);
}
updateAutoBudget();
});