Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Fix #3461
James Colecaddf3d1c641
diff --git a/app/Http/Controllers/Rule/SelectController.php b/app/Http/Controllers/Rule/SelectController.phpindex 807b6588fb..8833590a09 100644--- a/app/Http/Controllers/Rule/SelectController.php+++ b/app/Http/Controllers/Rule/SelectController.php@@ -128,6 +128,10 @@ class SelectController extends Controller*/public function selectTransactions(Rule $rule){+ if(false===$rule->active) {+ session()->flash('warning',trans('firefly.cannot_fire_inactive_rules'));+ return redirect(route('rules.index'));+ }// does the user have shared accounts?$first = session('first', Carbon::now()->subYear())->format('Y-m-d');$today = Carbon::now()->format('Y-m-d');diff --git a/resources/lang/en_US/firefly.php b/resources/lang/en_US/firefly.phpindex f71931885b..3a69b9b949 100644--- a/resources/lang/en_US/firefly.php+++ b/resources/lang/en_US/firefly.php@@ -298,6 +298,7 @@ return ['yearly' => 'yearly',// rules+ 'cannot_fire_inactive_rules' => 'You cannot execute inactive rules.','rules' => 'Rules','rule_name' => 'Name of rule','rule_triggers' => 'Rule triggers when',diff --git a/resources/views/v1/rules/index.twig b/resources/views/v1/rules/index.twigindex e1090a2a00..61c8863a3c 100644--- a/resources/views/v1/rules/index.twig+++ b/resources/views/v1/rules/index.twig@@ -107,6 +107,7 @@<td><div class="btn-group btn-group-xs test_buttons">{# show which transactions would match #}+ {% if rule.active %}<a href="#" class="btn btn-default test_rule_triggers" data-id="{{ rule.id }}"title="{{ 'test_rule_triggers'|_ }}"><i data-id="{{ rule.id }}"class="test_rule_triggers fa fa-fw fa-flask"></i></a>@@ -115,7 +116,7 @@<a href="{{ route('rules.select-transactions',rule.id) }}" class="btn btn-default"title=" {{ trans('firefly.apply_rule_selection', {title: rule.title}) }}"><i class="fa fa-fw fa-power-off "></i></a>-+ {% endif %}{# duplicate rule #}<a href="{{ route('rules.duplicate',rule.id) }}" class="btn btn-default"title=" {{ trans('firefly.duplicate_rule', {title: rule.title}) }}">