From 2b6e43b8109f212d3e65126a4a55f90da14f148d Mon Sep 17 00:00:00 2001 From: Brian Read Date: Fri, 29 Nov 2024 15:19:48 +0000 Subject: [PATCH] add 'my' to newly moved Db opening code! --- Templates/controller.pm.tem | 9 ++++----- Templates/html_controls.html.ep.xml | 1 + Templates/layout.html.ep.tem | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Templates/controller.pm.tem b/Templates/controller.pm.tem index a5bd530..d59617c 100644 --- a/Templates/controller.pm.tem +++ b/Templates/controller.pm.tem @@ -139,8 +139,8 @@ sub do_update { # the value of trt will tell you which panel has returned my $trt = $c->param('trt') || '${firstPanel}'; #hidden control on every form. my $ret = 'ok'; - #Validate the parameters in a custom sub one for each panel (although only one of these will be executed) + #Validate the parameters in a custom sub one for each panel (although only one of these will be executed) my $thispanel; if ($trt eq '${panel}'){ @@ -149,11 +149,11 @@ sub do_update { $thispanel = '${panel}'; } - if ($ret ne "ok"){ $c->do_display($thispanel); } else { #Do whatever is needed, including writing values to the DB + if ($trt eq '${panel}'){ #do whatever is required ... @@ -162,8 +162,8 @@ sub do_update { # return to the panel with error message $c->stash(error => $c->l($ret)); $c->stash( - title => $title, - modul => $modul, + title => $title, + modul => $modul, ${prefix}_data => \%${prefix}_data ); $c->render(template => "${lcPackageName}"); @@ -181,7 +181,6 @@ sub do_update { $$${prefix}_data{'trt'} = '${NextPanel | "none"}'; } $c->do_display($$${prefix}_data{'trt'}); - } } diff --git a/Templates/html_controls.html.ep.xml b/Templates/html_controls.html.ep.xml index ff327b9..4d4b01b 100644 --- a/Templates/html_controls.html.ep.xml +++ b/Templates/html_controls.html.ep.xml @@ -1,4 +1,5 @@ +