Fix case of package name in render call in pm file

This commit is contained in:
Brian Read 2024-06-20 09:52:29 +01:00
parent d1ab8b4256
commit 2d310967e1
2 changed files with 5 additions and 4 deletions

View File

@ -151,7 +151,7 @@ sub do_update {
if ($ret ne "ok") { if ($ret ne "ok") {
# return to the panel with error message # return to the panel with error message
$c->stash(error => $c->l($ret)); $c->stash(error => $c->l($ret));
$c->render("${PackageName}"); $c->render("${lcPackageName}");
} else { } else {
#Do whatever is needed, including writing values to the DB #Do whatever is needed, including writing values to the DB
<tal:block tal:repeat="panel panels"> <tal:block tal:repeat="panel panels">
@ -161,7 +161,7 @@ sub do_update {
if ($ret ne "ok") { if ($ret ne "ok") {
# return to the panel with error message # return to the panel with error message
$c->stash(error => $c->l($ret)); $c->stash(error => $c->l($ret));
$c->render("${PackageName}"); $c->render("${lcPackageName}");
} else { } else {
$c->stash( success => $c->l('${panel} panel action was successful')); #A bit bland - edit it in the lex file $c->stash( success => $c->l('${panel} panel action was successful')); #A bit bland - edit it in the lex file
} }
@ -180,7 +180,7 @@ sub do_update {
} else { } else {
$$${prefix}_data{'trt'} = '${NextPanel | "none"}'; $$${prefix}_data{'trt'} = '${NextPanel | "none"}';
} }
$c->render("${PackageName}"); $c->render("${lcPackageName}");
} }
} }
@ -241,7 +241,7 @@ sub do_display {
title => $title, title => $title,
${prefix}_data => \%${prefix}_data ${prefix}_data => \%${prefix}_data
); );
$c->render("${PackageName}"); $c->render("${lcPackageName}");
} }
1; 1;

View File

@ -38,6 +38,7 @@
%} %}
%#Routing to partials according to trt parameter. %#Routing to partials according to trt parameter.
%#This ought to be cascading if/then/elsif, but is easier to just stack the if/then's rather like a case statement'
<tal:block tal:repeat="condition conditions"> <tal:block tal:repeat="condition conditions">
% if ($$${prefix}_data->{trt} eq "${condition}") { % if ($$${prefix}_data->{trt} eq "${condition}") {
%= include 'partials/_${prefix}_${condition}' %= include 'partials/_${prefix}_${condition}'