Fix https://github.com/firefly-iii/firefly-iii/issues/8291 AND fix issue with non-strict rule triggers AND fix behaviour of actions

This commit is contained in:
James Cole
2023-12-25 06:03:56 +01:00
parent 2b90c20db8
commit 1bd1a9cba3
5 changed files with 36 additions and 12 deletions

View File

@@ -41,14 +41,26 @@ $(function () {
console.log('action count is zero, add action.');
addNewAction();
}
makeRuleStrict();
$('.add_rule_trigger').click(addNewTrigger);
$('.add_rule_action').click(addNewAction);
$('#ffInput_strict').change(makeRuleStrict);
$('.test_rule_triggers').click(testRuleTriggers);
$('.remove-trigger').unbind('click').click(removeTrigger);
$('.remove-action').unbind('click').click(removeAction);
});
function makeRuleStrict() {
var value = $('#ffInput_strict').is(':checked');
if(value) {
// is checked, stop processing triggers is not relevant.
$('.trigger-stop-processing').prop('checked', false);
$('.trigger-stop-processing').prop('disabled', true);
return;
}
$('.trigger-stop-processing').prop('disabled', false);
}
/**
* This method triggers when a new trigger must be added to the form.
*/
@@ -181,6 +193,7 @@ function onAddNewAction() {
console.log('Trigger updateActionInput() for select ' + select);
updateActionInput(select);
});
makeRuleStrict();
}
/**
@@ -207,6 +220,7 @@ function onAddNewTrigger() {
console.log('Trigger updateTriggerInput() for select ' + select);
updateTriggerInput(select);
});
makeRuleStrict();
}
/**