From bd5e33ab112955f7af2179ab903ee75c28bf3562 Mon Sep 17 00:00:00 2001 From: Markus Frosch Date: Thu, 12 Apr 2018 12:44:25 +0200 Subject: [PATCH] SyncruleController: Handle forms before processing the rule for content This ensures we show the latest details on the sync rule, without need to reload the view (reload was active before adding benchmark) --- application/controllers/SyncruleController.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/application/controllers/SyncruleController.php b/application/controllers/SyncruleController.php index 54af3679..479456e2 100644 --- a/application/controllers/SyncruleController.php +++ b/application/controllers/SyncruleController.php @@ -26,6 +26,9 @@ class SyncruleController extends ActionController $ruleName = $rule->get('rule_name'); $this->addTitle($this->translate('Sync rule: %s'), $ruleName); + $checkForm = SyncCheckForm::load()->setSyncRule($rule)->handleRequest(); + $runForm = SyncRunForm::load()->setSyncRule($rule)->handleRequest(); + if ($lastRunId = $rule->getLastSyncRunId()) { $run = SyncRun::load($lastRunId, $this->db()); } else { @@ -78,8 +81,8 @@ class SyncruleController extends ActionController break; } - $c->add(SyncCheckForm::load()->setSyncRule($rule)->handleRequest()); - $c->add(SyncRunForm::load()->setSyncRule($rule)->handleRequest()); + $c->add($checkForm); + $c->add($runForm); if ($run) { $c->add(Html::h3($this->translate('Last sync run details')));