From 8f7f24dbecc8e5b16687bd21c31038b8f6bd4650 Mon Sep 17 00:00:00 2001 From: Brian Read Date: Tue, 5 Nov 2024 18:56:37 +0000 Subject: [PATCH] Make form module name in partials lowercase - part of routing problem --- Templates/partial.html.ep.tem | 2 +- sm2gen.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Templates/partial.html.ep.tem b/Templates/partial.html.ep.tem index ba2e9f1..c4bcc3f 100644 --- a/Templates/partial.html.ep.tem +++ b/Templates/partial.html.ep.tem @@ -13,7 +13,7 @@ % } % my $btn = l('APPLY'); - %= form_for "${PackageName}d" => (method => 'POST') => begin + %= form_for "${lcPackageName}u" => (method => 'POST') => begin % param 'trt' => $$${prefix}_data->{trt} unless param 'trt'; %= hidden_field 'trt' => $$${prefix}_data->{trt} %# Inputs etc in here. diff --git a/sm2gen.py b/sm2gen.py index 6648868..4a24e6f 100644 --- a/sm2gen.py +++ b/sm2gen.py @@ -669,7 +669,9 @@ if __name__ == "__main__": partial_mojo_context = {**json5_dict, **html} try: partial_mojo_template = partial_template.render( - version=strVersion, **partial_mojo_context + version=strVersion, **partial_mojo_context, + lcPackageName=json5_dict["PackageName"].lower() + ) with open(partial_files[i], "w") as file: file.write(partial_mojo_template)