From ce91fbab452fa5160afc9d28c5343b9ed56c59a6 Mon Sep 17 00:00:00 2001 From: Brian Read Date: Fri, 29 Nov 2024 16:15:55 +0000 Subject: [PATCH] Up to date letsencrypt files and fix up validate template in custom --- Targets/Letsencrypt/Letsencrypt-Custom.pm | 2 +- Targets/Letsencrypt/Letsencrypt.pm | 27 +++---- .../Letsencrypt/_lets_CHECKALLDOMAINS.html.ep | 2 +- .../_lets_CHECKALLENABLEDDOMAINS.html.ep | 2 +- .../Letsencrypt/_lets_CHECKONEDOMAIN.html.ep | 2 +- Targets/Letsencrypt/_lets_LIST.html.ep | 2 +- Targets/Letsencrypt/_lets_PARAMS.html.ep | 2 +- Targets/Letsencrypt/letsencrypt.html.ep | 4 +- Targets/Letsencrypt/letsencrypt_en.lex | 80 ++++++++++--------- Templates/custom.pm.tem | 2 +- 10 files changed, 63 insertions(+), 62 deletions(-) diff --git a/Targets/Letsencrypt/Letsencrypt-Custom.pm b/Targets/Letsencrypt/Letsencrypt-Custom.pm index 574c2c1..c512a34 100644 --- a/Targets/Letsencrypt/Letsencrypt-Custom.pm +++ b/Targets/Letsencrypt/Letsencrypt-Custom.pm @@ -52,7 +52,7 @@ our $ddb = esmith::DomainsDB->open() || die("Couldn't open Domains db"); my $c = shift; my $prefix_data = shift; #Data hash as parameter # Validation for each field - my $ret = "Error from params"; + my $ret = ""; if (! TRUE) #validate $c->param('status') {$ret .= 'Validation for status failed';} if (! TRUE) #validate $c->param('hookScript') diff --git a/Targets/Letsencrypt/Letsencrypt.pm b/Targets/Letsencrypt/Letsencrypt.pm index fa92aed..9e1e7b7 100644 --- a/Targets/Letsencrypt/Letsencrypt.pm +++ b/Targets/Letsencrypt/Letsencrypt.pm @@ -1,6 +1,6 @@ package SrvMngr::Controller::Letsencrypt; # -# Generated by SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-11-29 13:00:55 +# Generated by SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-11-29 15:59:19 # #---------------------------------------------------------------------- # heading : Network @@ -137,8 +137,8 @@ sub do_update { # the value of trt will tell you which panel has returned my $trt = $c->param('trt') || 'LIST'; #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 'LIST'){ @@ -171,12 +171,12 @@ sub do_update { $thispanel = 'CHECKONEDOMAIN'; } - if ($ret ne "ok"){ $c->do_display($thispanel); } else { #Do whatever is needed, including writing values to the DB + if ($trt eq 'LIST'){ #do whatever is required ... $ret = $c->perform_LIST(\%lets_data); @@ -184,8 +184,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, lets_data => \%lets_data ); $c->render(template => "letsencrypt"); @@ -201,8 +201,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, lets_data => \%lets_data ); $c->render(template => "letsencrypt"); @@ -218,8 +218,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, lets_data => \%lets_data ); $c->render(template => "letsencrypt"); @@ -235,8 +235,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, lets_data => \%lets_data ); $c->render(template => "letsencrypt"); @@ -252,8 +252,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, lets_data => \%lets_data ); $c->render(template => "letsencrypt"); @@ -271,7 +271,6 @@ sub do_update { $lets_data{'trt'} = 'none'; } $c->do_display($lets_data{'trt'}); - } } diff --git a/Targets/Letsencrypt/_lets_CHECKALLDOMAINS.html.ep b/Targets/Letsencrypt/_lets_CHECKALLDOMAINS.html.ep index 68d38f1..832cf7b 100644 --- a/Targets/Letsencrypt/_lets_CHECKALLDOMAINS.html.ep +++ b/Targets/Letsencrypt/_lets_CHECKALLDOMAINS.html.ep @@ -1,5 +1,5 @@ %# -%# Generated by SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-11-29 13:00:55 +%# Generated by SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-11-29 15:59:19 %#