mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-05 04:03:26 +00:00
Fixed #3737
This commit is contained in:
@@ -143,6 +143,12 @@ class CreateController extends Controller
|
||||
$oldTriggers = $this->getTriggersForBill($bill);
|
||||
$oldActions = $this->getActionsForBill($bill);
|
||||
|
||||
// restore actions and triggers from old input:
|
||||
if ($request->old()) {
|
||||
$oldTriggers = $this->getPreviousTriggers($request);
|
||||
$oldActions = $this->getPreviousActions($request);
|
||||
}
|
||||
|
||||
$triggerCount = count($oldTriggers);
|
||||
$actionCount = count($oldActions);
|
||||
$subTitleIcon = 'fa-clone';
|
||||
@@ -179,8 +185,6 @@ class CreateController extends Controller
|
||||
// get triggers and actions for journal.
|
||||
$oldTriggers = $this->getTriggersForJournal($journal);
|
||||
$oldActions = [];
|
||||
$triggerCount = count($oldTriggers);
|
||||
$actionCount = count($oldActions);
|
||||
|
||||
$this->createDefaultRuleGroup();
|
||||
$this->createDefaultRule();
|
||||
@@ -192,6 +196,15 @@ class CreateController extends Controller
|
||||
'description' => (string) trans('firefly.new_rule_for_journal_description', ['description' => $journal->description]),
|
||||
];
|
||||
|
||||
// restore actions and triggers from old input:
|
||||
if ($request->old()) {
|
||||
$oldTriggers = $this->getPreviousTriggers($request);
|
||||
$oldActions = $this->getPreviousActions($request);
|
||||
}
|
||||
|
||||
$triggerCount = count($oldTriggers);
|
||||
$actionCount = count($oldActions);
|
||||
|
||||
// flash old data
|
||||
$request->session()->flash('preFilled', $preFilled);
|
||||
|
||||
|
Reference in New Issue
Block a user