%#
%# Generated by SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-12-01 15:22:43
%#
% layout 'AdminLTE', title => "Sme server 2 - Letsencrypt certificate", share_dir => './';
%# css specific to this panel:

% content_for 'module' => begin

<!-- reetp needs moving - probabyl not required -->

<!-- stylesheet '/css/letsencrypt.css' -->

<div  class="card-body">

    % if (config->{debug} == 1) {
    <pre>
        <%= dumper $c->current_route %>
        <%= dumper $lets_data->{trt}  %>
    </pre>
    % }

    <h1><%=$title%></h1>

    % if ( stash('modul')) {
        <br>
        <div>
            <%= $c->render_to_string(inline => stash('modul') ); %>
        </div>
    % }

    % if ($c->stash('first')) {
        <br>
        <div>
            <%=$c->render_to_string(inline =>$c->l($c->stash('first')))  %>
        </div>

    % } elsif ($c->stash('success')) {
        <div class="text-success">
            <h2><%=$c->l('lets_Status_Report') %></h2>
            <div>
                <%= $c->l($c->stash('success')); %>
            </div>
        </div>

    % } elsif ($c->stash('error')) {
       <div class="text-danger">
            <h2><%=$c->l('lets_Error_Status_Report') %></h2>
            <div>
                <%= $c->l($c->stash('error')); %>
            </div>
        </div>
    % }

    %#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 ($lets_data->{trt} eq "LIST") {
        <%= include 'partials/_lets_LIST' %>
    % }

    % if ($lets_data->{trt} eq "PARAMS") {
        <%= include 'partials/_lets_PARAMS' %>
    % }

    % if ($lets_data->{trt} eq "CHECKALLDOMAINS") {
        <%= include 'partials/_lets_CHECKALLDOMAINS' %>
    % }

    % if ($lets_data->{trt} eq "CHECKALLENABLEDDOMAINS") {
        <%= include 'partials/_lets_CHECKALLENABLEDDOMAINS' %>
    % }

    % if ($lets_data->{trt} eq "CHECKONEDOMAIN") {
        <%= include 'partials/_lets_CHECKONEDOMAIN' %>
    % }

</div>
%end