From e8e62c393c2ecc4a2c24d3880ce66f96f22af9c4 Mon Sep 17 00:00:00 2001 From: Andy Newton Date: Wed, 24 Jan 2024 16:24:55 +0000 Subject: [PATCH 1/2] fix: Other template fixes where getHelperPluginManager was being used causing errors --- .../Olcs/view/olcs/user-forgot-username/check-email.phtml | 2 +- module/Olcs/view/olcs/user-registration/check-email.phtml | 2 +- module/Olcs/view/pages/lva-details.phtml | 8 +++----- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/module/Olcs/view/olcs/user-forgot-username/check-email.phtml b/module/Olcs/view/olcs/user-forgot-username/check-email.phtml index 3aa5e7876..1acf0396f 100644 --- a/module/Olcs/view/olcs/user-forgot-username/check-email.phtml +++ b/module/Olcs/view/olcs/user-forgot-username/check-email.phtml @@ -12,7 +12,7 @@ translateReplace( 'user-forgot-username.page.check-email.content', [ - $this->getHelperPluginManager()->get('Helper\Url')->fromRoute('auth/login/GET') + $this->url->fromRoute('auth/login/GET') ] ); ?>

diff --git a/module/Olcs/view/olcs/user-registration/check-email.phtml b/module/Olcs/view/olcs/user-registration/check-email.phtml index 8ed3c11ea..a5954bce5 100644 --- a/module/Olcs/view/olcs/user-registration/check-email.phtml +++ b/module/Olcs/view/olcs/user-registration/check-email.phtml @@ -23,7 +23,7 @@ echo $this->partial( translateReplace( 'user-registration.page.check-email.content', [ - $this->getHelperPluginManager()->get('Helper\Url')->fromRoute('auth/login/GET') + $this->url->fromRoute('auth/login/GET') ] ); ?>

diff --git a/module/Olcs/view/pages/lva-details.phtml b/module/Olcs/view/pages/lva-details.phtml index 803965c58..8115883a9 100644 --- a/module/Olcs/view/pages/lva-details.phtml +++ b/module/Olcs/view/pages/lva-details.phtml @@ -42,19 +42,17 @@ echo $this->partial( form($filterForm); ?> translate($this->status); - /** @var \Common\Service\Helper\TranslationHelperService $translator */ - $translator = $this->getHelperPluginManager()->get('Helper\Translation'); if ($this->lva === 'application') { - echo $translator->translateReplace( + echo $this->translateReplace( 'markup-application-right-column', [$this->escapeHtml($reference), $statusTranslated] ); } elseif ($this->lva === 'variation') { - echo $translator->translateReplace( + echo $this->translateReplace( 'markup-variation-right-column', [$this->escapeHtml($reference), $statusTranslated] ); } elseif ($this->lva === 'licence') { - echo $translator->translateReplace( + echo $this->translateReplace( 'markup-licence-right-column', [ $this->escapeHtml($this->licNo), From a3877d38d95b9f40b1a0a7035e5883b70f19beb4 Mon Sep 17 00:00:00 2001 From: Andy Newton Date: Thu, 25 Jan 2024 16:06:23 +0000 Subject: [PATCH 2/2] fix: Corrects usage of url helper in 2 refactored templates. Erroneous call to fromRoute removed. Tested ok. --- module/Olcs/view/olcs/user-forgot-username/check-email.phtml | 2 +- module/Olcs/view/olcs/user-registration/check-email.phtml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/module/Olcs/view/olcs/user-forgot-username/check-email.phtml b/module/Olcs/view/olcs/user-forgot-username/check-email.phtml index 1acf0396f..92f99011c 100644 --- a/module/Olcs/view/olcs/user-forgot-username/check-email.phtml +++ b/module/Olcs/view/olcs/user-forgot-username/check-email.phtml @@ -12,7 +12,7 @@ translateReplace( 'user-forgot-username.page.check-email.content', [ - $this->url->fromRoute('auth/login/GET') + $this->url('auth/login/GET') ] ); ?>

diff --git a/module/Olcs/view/olcs/user-registration/check-email.phtml b/module/Olcs/view/olcs/user-registration/check-email.phtml index a5954bce5..4fc71a3a0 100644 --- a/module/Olcs/view/olcs/user-registration/check-email.phtml +++ b/module/Olcs/view/olcs/user-registration/check-email.phtml @@ -23,7 +23,7 @@ echo $this->partial( translateReplace( 'user-registration.page.check-email.content', [ - $this->url->fromRoute('auth/login/GET') + $this->url('auth/login/GET') ] ); ?>