- Re-factor email settings panel as error handling not working as expected. [SME: 12973]
72 lines
1.6 KiB
Plaintext
72 lines
1.6 KiB
Plaintext
%#
|
|
%# Generated by SM2Gen version:0.9(20Jan2025) Chameleon version:4.5.4 On Python:3.12.3 at 2025-06-29 08:53:20
|
|
%#
|
|
% layout 'default', title => "Sme server 2 - E-Mail", share_dir => './';
|
|
%# css specific to this panel:
|
|
% content_for 'module' => begin
|
|
%= stylesheet '/css/emailsettings.css'
|
|
%= javascript '/js/emailsettings.js'
|
|
|
|
% use constant FALSE => 0;
|
|
% use constant TRUE => 1;
|
|
|
|
<div id="module" class="module Emailsettings-panel">
|
|
|
|
% if (config->{debug} == 1) {
|
|
<pre>
|
|
%= dumper $c->current_route
|
|
%= dumper $mai_data->{trt}
|
|
</pre>
|
|
% }
|
|
|
|
<h1><%=$title%></h1>
|
|
|
|
% if ( stash('modul')) {
|
|
%= $c->render_to_string(inline => stash('modul') );
|
|
% }
|
|
|
|
%if ($c->stash('first')) {
|
|
<br><p>
|
|
%=$c->render_to_string(inline =>$c->l($c->stash('first')))
|
|
</p>
|
|
|
|
%} elsif ($c->stash('success')) {
|
|
<div class='success '>
|
|
%= $c->l($c->stash('success'));
|
|
</div>
|
|
<br />
|
|
|
|
%} elsif ($c->stash('error')) {
|
|
<div class='sme-error'>
|
|
%= $c->l($c->stash('error'));
|
|
</div>
|
|
<br />
|
|
%}
|
|
|
|
%#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'
|
|
|
|
% if ($mai_data->{trt} eq "FRONT") {
|
|
%= include 'partials/_mai_FRONT'
|
|
%}
|
|
|
|
% if ($mai_data->{trt} eq "ACC") {
|
|
%= include 'partials/_mai_ACC'
|
|
%}
|
|
|
|
% if ($mai_data->{trt} eq "FIL") {
|
|
%= include 'partials/_mai_FIL'
|
|
%}
|
|
|
|
% if ($mai_data->{trt} eq "REC") {
|
|
%= include 'partials/_mai_REC'
|
|
%}
|
|
|
|
% if ($mai_data->{trt} eq "DEL") {
|
|
%= include 'partials/_mai_DEL'
|
|
%}
|
|
|
|
|
|
|
|
</div>
|
|
%end |