This commit is contained in:
Florian Dupret 2020-09-24 19:42:12 +02:00
parent b1b2e0ff09
commit 602f5b6646
2 changed files with 10 additions and 10 deletions

View File

@ -328,8 +328,8 @@ class FireflyValidator extends Validator
}
// these trigger types need a simple strlen check:
$length = ['from_account_starts', 'from_account_ends', 'from_account_is', 'from_account_contains', 'to_account_starts', 'to_account_ends',
'to_account_is', 'to_account_contains', 'description_starts', 'description_ends', 'description_contains', 'description_is', 'category_is',
$length = ['source_account_starts', 'source_account_ends', 'source_account_is', 'source_account_contains', 'destination_account_starts', 'destination_account_ends',
'destination_account_is', 'destination_account_contains', 'description_starts', 'description_ends', 'description_contains', 'description_is', 'category_is',
'budget_is', 'tag_is', 'currency_is', 'notes_contain', 'notes_start', 'notes_end', 'notes_are',];
if (in_array($triggerType, $length, true)) {
return '' !== $value;

View File

@ -303,14 +303,14 @@ function updateTriggerInput(selectList) {
inputResult.prop('disabled', false);
inputResult.prop('type', 'text');
switch (selectList.val()) {
case 'from_account_starts':
case 'from_account_ends':
case 'from_account_is':
case 'from_account_contains':
case 'to_account_starts':
case 'to_account_ends':
case 'to_account_is':
case 'to_account_contains':
case 'source_account_starts':
case 'source_account_ends':
case 'source_account_is':
case 'source_account_contains':
case 'destination_account_starts':
case 'destination_account_ends':
case 'destination_account_is':
case 'destination_account_contains':
console.log('Select list value is ' + selectList.val() + ', so input needs auto complete.');
createAutoComplete(inputResult, 'api/v1/autocomplete/accounts');
break;