mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-06 12:45:30 +00:00
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:
@@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user