Compare commits

..

3 Commits

Author SHA1 Message Date
John Crisp
0d7f87c6aa Move more code to html and work on forms 2025-04-19 01:39:57 +02:00
John Crisp
b42afb227a More cleanup and add card support 2025-04-18 15:11:03 +02:00
John Crisp
767cf3bc19 More review template fixes 2025-04-17 17:53:04 +02:00
74 changed files with 556 additions and 370 deletions

View File

@@ -2,7 +2,7 @@
% content_for 'module' => begin % content_for 'module' => begin
<div> <div class="card-body">
% if (config->{debug} == 1) { % if (config->{debug} == 1) {
<p> <p>
%= dumper $c->current_route %= dumper $c->current_route

View File

@@ -2,7 +2,8 @@
% content_for 'module' => begin % content_for 'module' => begin
<div> <div class="card-body">
% if (config->{debug} == 1) { % if (config->{debug} == 1) {
<p> <p>
%= dumper $c->current_route %= dumper $c->current_route

View File

@@ -2,7 +2,8 @@
% content_for 'module' => begin % content_for 'module' => begin
<div> <div class="card-body">
% if (config->{debug} == 1) { % if (config->{debug} == 1) {
<p> <p>
%= dumper $c->current_route %= dumper $c->current_route

View File

@@ -2,7 +2,8 @@
% content_for 'module' => begin % content_for 'module' => begin
<div> <div class="card-body">
% if (config->{debug} == 1) { % if (config->{debug} == 1) {
<p> <p>
%= dumper $c->current_route %= dumper $c->current_route

View File

@@ -2,7 +2,8 @@
% content_for 'module' => begin % content_for 'module' => begin
<div> <div class="card-body">
% if (config->{debug} == 1) { % if (config->{debug} == 1) {
<p> <p>
%= dumper $c->current_route %= dumper $c->current_route

View File

@@ -2,7 +2,8 @@
% content_for 'module' => begin % content_for 'module' => begin
<div> <div class="card-body">
% if (config->{debug} == 1) { % if (config->{debug} == 1) {
<p> <p>
%= dumper $c->current_route %= dumper $c->current_route

View File

@@ -2,7 +2,8 @@
% content_for 'module' => begin % content_for 'module' => begin
<div> <div class="card-body">
% if (config->{debug} == 1) { % if (config->{debug} == 1) {
<p> <p>
%= dumper $c->current_route %= dumper $c->current_route

View File

@@ -2,7 +2,8 @@
% content_for 'module' => begin % content_for 'module' => begin
<div> <div class="card-body">
% if (config->{debug} == 1) { % if (config->{debug} == 1) {
<p> <p>
%= dumper $c->current_route %= dumper $c->current_route

View File

@@ -2,7 +2,8 @@
% content_for 'module' => begin % content_for 'module' => begin
<div id="" class=""> <div class="card-body">
% if (config->{debug} == 1) { % if (config->{debug} == 1) {
<p> <p>
%= dumper $c->current_route %= dumper $c->current_route

View File

@@ -1,7 +1,8 @@
% layout 'AdminLTE', title => "Sme server 2 - backup - verify"; % layout 'AdminLTE', title => "Sme server 2 - backup - verify";
% content_for 'module' => begin % content_for 'module' => begin
<div> <div class="card-body">
% if (config->{debug} == 1) { % if (config->{debug} == 1) {
<p> <p>
%= dumper $c->current_route %= dumper $c->current_route

View File

@@ -1,7 +1,8 @@
% layout 'AdminLTE', title => "Sme server 2 - backup - verify"; % layout 'AdminLTE', title => "Sme server 2 - backup - verify";
% content_for 'module' => begin % content_for 'module' => begin
<div> <div class="card-body">
% if (config->{debug} == 1) { % if (config->{debug} == 1) {
<p> <p>
%= dumper $c->current_route %= dumper $c->current_route

View File

@@ -2,7 +2,8 @@
% content_for 'module' => begin % content_for 'module' => begin
<div> <div class="card-body">
% if (config->{debug} == 1) { % if (config->{debug} == 1) {
<p> <p>
%= dumper $c->current_route %= dumper $c->current_route

View File

@@ -2,7 +2,7 @@
% content_for 'module' => begin % content_for 'module' => begin
<div> <div class="card-body">
% if (config->{debug} == 1) { % if (config->{debug} == 1) {
<p> <p>

View File

@@ -2,7 +2,7 @@
% content_for 'module' => begin % content_for 'module' => begin
<div> <div class="card-body">
% if (config->{debug} == 1) { % if (config->{debug} == 1) {
<p> <p>

View File

@@ -1,7 +1,9 @@
% layout 'AdminLTE', title => "Sme server 2 - clamav"; % layout 'AdminLTE', title => "Sme server 2 - clamav";
% content_for 'module' => begin % content_for 'module' => begin
<div>
<div class="card-body">
%if (config->{debug} == 1) { %if (config->{debug} == 1) {
<p>(DBG)route: <%= $c->current_route %><br> <p>(DBG)route: <%= $c->current_route %><br>
(DBG)FsS stat: <%= $clm_datas->{FilesystemScan}%> <br> (DBG)FsS stat: <%= $clm_datas->{FilesystemScan}%> <br>

View File

@@ -1,7 +1,8 @@
% layout 'AdminLTE', title => "Sme server 2 - err 400"; % layout 'AdminLTE', title => "Sme server 2 - err 400";
% content_for 'module' => begin % content_for 'module' => begin
<div>
<div class="card-body">
<div class="text-danger"> <div class="text-danger">
%= l 'CSRF_VALIDATION_FAILURE' %= l 'CSRF_VALIDATION_FAILURE'
</div> </div>

View File

@@ -1,7 +1,8 @@
% layout 'AdminLTE', title => "Sme server 2 - datetime"; % layout 'AdminLTE', title => "Sme server 2 - datetime";
% content_for 'module' => begin % content_for 'module' => begin
<div>
<div class="card-body">
% if (config->{debug} == 1) { % if (config->{debug} == 1) {
<p> <p>

View File

@@ -2,7 +2,8 @@
% content_for 'module' => begin % content_for 'module' => begin
<div> <div class="card-body">
<p><%= $title %></p> <p><%= $title %></p>
<%= $modul %> <%= $modul %>
<p> <p>

View File

@@ -1,7 +1,8 @@
% layout 'AdminLTE', title => "Sme server 2 - directory"; % layout 'AdminLTE', title => "Sme server 2 - directory";
% content_for 'module' => begin % content_for 'module' => begin
<div>
<div class="card-body">
%if (config->{debug} == 1) { %if (config->{debug} == 1) {
<p> <p>

View File

@@ -1,7 +1,8 @@
% layout 'AdminLTE', title => "Sme server 2 - domains"; % layout 'AdminLTE', title => "Sme server 2 - domains";
% content_for 'module' => begin % content_for 'module' => begin
<div>
<div class="card-body">
% if (config->{debug} == 1) { % if (config->{debug} == 1) {
<p> <p>

View File

@@ -1,7 +1,8 @@
% layout 'AdminLTE', title => "Sme server 2 - emailaccess"; % layout 'AdminLTE', title => "Sme server 2 - emailaccess";
% content_for 'module' => begin % content_for 'module' => begin
<div>
<div class="card-body">
% if (config->{debug} == 1) { % if (config->{debug} == 1) {
<p> <p>

View File

@@ -1,7 +1,8 @@
% layout 'AdminLTE', title => "Sme server 2 - emaildeliver"; % layout 'AdminLTE', title => "Sme server 2 - emaildeliver";
% content_for 'module' => begin % content_for 'module' => begin
<div>
<div class="card-body">
% if (config->{debug} == 1) { % if (config->{debug} == 1) {
<p> <p>

View File

@@ -1,7 +1,8 @@
% layout 'AdminLTE', title => "Sme server 2 - emailfilter"; % layout 'AdminLTE', title => "Sme server 2 - emailfilter";
% content_for 'module' => begin % content_for 'module' => begin
<div>
<div class="card-body"
% if (config->{debug} == 1) { % if (config->{debug} == 1) {
<p> <p>

View File

@@ -5,7 +5,7 @@
% use constant FALSE => 0; % use constant FALSE => 0;
% use constant TRUE => 1; % use constant TRUE => 1;
<div> <div class="card-body">
% if (config->{debug} == 1) { % if (config->{debug} == 1) {
<p> <p>

View File

@@ -5,9 +5,9 @@
% use constant FALSE => 0; % use constant FALSE => 0;
% use constant TRUE => 1; % use constant TRUE => 1;
<div> <div class="card-body">
% if (config->{debug} == TRUE) { % if (config->{debug} == 1) {
<p> <p>
%= dumper $c->current_route %= dumper $c->current_route
%= dumper $mai_datas %= dumper $mai_datas

View File

@@ -2,7 +2,8 @@
% content_for 'module' => begin % content_for 'module' => begin
<div> <div class="card-body">
% if (config->{debug} == 1) { % if (config->{debug} == 1) {
<p> <p>
%= dumper $c->current_route %= dumper $c->current_route

View File

@@ -2,7 +2,7 @@
% content_for 'module' => begin % content_for 'module' => begin
<div> <div class="card-body">
<p> <p>
<br>dev<br> <br>dev<br>
Oups !!! Oups !!!

View File

@@ -1,7 +1,8 @@
% layout 'AdminLTE', title => "Sme server 2 - groups"; % layout 'AdminLTE', title => "Sme server 2 - groups";
% content_for 'module' => begin % content_for 'module' => begin
<div>
<div class="card-body">
% if (config->{debug} == 1) { % if (config->{debug} == 1) {
<p> <p>

View File

@@ -1,7 +1,8 @@
% layout 'AdminLTE', title => "Sme server 2 - hostentries"; % layout 'AdminLTE', title => "Sme server 2 - hostentries";
% content_for 'module' => begin % content_for 'module' => begin
<div>
<div class="card-body">
% if (config->{debug} == 1) { % if (config->{debug} == 1) {
<p> <p>

View File

@@ -1,7 +1,8 @@
% layout 'AdminLTE', title => "Sme server 2 - ibays"; % layout 'AdminLTE', title => "Sme server 2 - ibays";
% content_for 'module' => begin % content_for 'module' => begin
<div>
<div class="card-body">
% if (config->{debug} == 1) { % if (config->{debug} == 1) {
<p> <p>

View File

@@ -8,7 +8,7 @@
</p> </p>
% } % }
<div> <div class="card-body">
% if ( stash 'error' ) { % if ( stash 'error' ) {
<br> <br>
@@ -20,9 +20,8 @@
<h3><%= $title %> </h3> <h3><%= $title %> </h3>
<!-- <h3>template: initial.html.ep</h3> --> <!-- <h3>template: initial.html.ep</h3> -->
<!-- <H1>Initial AdminLTE</H1> --> <!-- <H1>Initial AdminLTE</H1> -->
<p>
%= $modul %= $modul
</p>
</div> </div>

View File

@@ -12,6 +12,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
%= content_for 'head_contrib' %= content_for 'head_contrib'
% if (config 'hasJquery') { % if (config 'hasJquery') {
%= include 'partials/_js_imports' %= include 'partials/_js_imports'
%= include 'common_js' %= include 'common_js'
@@ -28,8 +29,6 @@
%= include 'partials/_nutups_overrides' %= include 'partials/_nutups_overrides'
% } % }
</head> </head>
<body class="sidebar-expand-lg bg-body-tertiary"> <body class="sidebar-expand-lg bg-body-tertiary">
@@ -47,9 +46,12 @@
<div class="app-wrapper"> <div class="app-wrapper">
<!-- Should create a new separate header partial --> <!-- Should create a new separate header partial?? -->
<!--begin::Header--> <!--begin::Header-->
<nav id="koozali_grad" class="app-header navbar navbar-expand bg-success-subtle" data-bs-theme="light"> <nav id="koozali_grad" class="app-header navbar navbar-expand bg-success-subtle" data-bs-theme="light">
<!--begin::Container--> <!--begin::Container-->
<div class="container-fluid"> <div class="container-fluid">
<!--begin::Start Navbar Links--> <!--begin::Start Navbar Links-->
@@ -72,12 +74,12 @@
</li> </li>
</ul> </ul>
<!--end::Start Navbar Links--> <!--end::Start Navbar Links-->
<!-- this can do direct to header so always available--> <!-- this can do direct to header so always available-->
% if ($c->is_logged_in && scalar @{SrvMngr::theme_list( $c )} > 1) { % if ($c->is_logged_in && scalar @{SrvMngr::theme_list( $c )} > 1) {
%= include 'partials/_swt_theme' %= include 'partials/_swt_theme'
% } % }
</div> </div>
<!--end::Container--> <!--end::Container-->
</nav> </nav>
@@ -87,6 +89,7 @@
<!--begin::Sidebar--> <!--begin::Sidebar-->
<aside class="app-sidebar bg-success-subtle" data-bs-theme="light"> <aside class="app-sidebar bg-success-subtle" data-bs-theme="light">
<!--begin::Sidebar Brand--> <!--begin::Sidebar Brand-->
<div class="sidebar-brand sidebar-dark-primary"> <div class="sidebar-brand sidebar-dark-primary">
@@ -126,10 +129,12 @@
</div> </div>
<!--end::Sidebar Wrapper--> <!--end::Sidebar Wrapper-->
</aside> </aside>
<!--end::Sidebar--> <!--end::Sidebar-->
<!--begin::App Main--> <!--begin::App Main-->
<main class="app-main"> <main class="app-main">
<!-- Can add a header row here? --> <!-- Can add a header row here? -->
@@ -143,15 +148,29 @@
<!-- Add breadcrumb here --> <!-- Add breadcrumb here -->
%= include 'partials/_app_content_breadcrumb' %= include 'partials/_app_content_breadcrumb'
<! We can add extra rows in the main panel here --> <!-- We can add extra rows in the main panel here -->
<!-- %#= include 'partials/_app_content_first_row' --> <!-- %#= include 'partials/_app_content_first_row' -->
<!-- %#= include 'partials/_app_content_demo_row' --> <!-- %#= include 'partials/_app_content_demo_row' -->
<!--end::Rows--> <!--end::Rows-->
<br> <br>
<!-- This is the main page content depening on the calling module --> <!-- This is the main page content depening on the calling module -->
<!-- nameofpanel.html.ep -->
<!-- That will also include it's own _partials -->
%#= dumper $c->current_route
% if ($c->current_route ne 'login') {
%= include 'partials/_panel_card_top'
%= include 'partials/_panel_card_header'
% }
%= content 'module' %= content 'module'
% if ($c->current_route ne 'login') {
%= include 'partials/_panel_card_footer'
%= include 'partials/_panel_card_bottom'
% }
</div> </div>
</div> </div>
<!--end::App Content--> <!--end::App Content-->
@@ -159,6 +178,7 @@
</main> </main>
<!--end::App Main--> <!--end::App Main-->
<!-- This is the original footer - move content to new one -->
<!-- %= include 'partials/_footer' --> <!-- %= include 'partials/_footer' -->
<!--begin::Footer--> <!--begin::Footer-->

View File

@@ -6,9 +6,11 @@
% content_for 'module' => begin % content_for 'module' => begin
<!-- needs moving -->
%= stylesheet '/css/letsencrypt.css' %= stylesheet '/css/letsencrypt.css'
<div> <div class="card-body">
% if (config->{debug} == 1) { % if (config->{debug} == 1) {
<pre> <pre>

View File

@@ -1,7 +1,8 @@
% layout 'AdminLTE', title => "Sme server 2 - localnetworks"; % layout 'AdminLTE', title => "Sme server 2 - localnetworks";
% content_for 'module' => begin % content_for 'module' => begin
<div>
<div class="card-body">
% if (config->{debug} == 1) { % if (config->{debug} == 1) {
<p> <p>

View File

@@ -1,8 +1,11 @@
% layout 'AdminLTE', title => 'Sme server 2 - Manual'; % layout 'AdminLTE', title => 'Sme server 2 - Manual';
% content_for 'module' => begin % content_for 'module' => begin
<div id="" class="">
<p><h1><%= $title %></h1></p> <div class="card-body">
<p>
<h1><%= $title %></h1>
</p>
%= $c->render_to_string( inline => stash 'modul' ) %= $c->render_to_string( inline => stash 'modul' )
</div> </div>

View File

@@ -2,9 +2,11 @@
% content_for 'module' => begin % content_for 'module' => begin
<!-- should be moved? -->
%= stylesheet '/css/module.css' %= stylesheet '/css/module.css'
<div id="" class=""> <div class="card-body">
% if (config->{debug} == 1) { % if (config->{debug} == 1) {
<p> <p>
<strong>Debug Info:</strong> <strong>Debug Info:</strong>

View File

@@ -2,8 +2,9 @@
% content_for 'module' => begin % content_for 'module' => begin
<div id="" class=""> <div class="card-body">
<p><br>dev<br> Oups !!! <p>
<br>dev<br> Oups !!!
The page you were requesting The page you were requesting
"<%= $self->req->url->path || '/' %>" "<%= $self->req->url->path || '/' %>"
could not be found. could not be found.

View File

@@ -1,6 +1,7 @@
% layout 'AdminLTE', title => 'Sme server 2 - Error P'; % layout 'AdminLTE', title => 'Sme server 2 - Error P';
<div id="" class=""> <div class="card-body">
<p><br><br> <p>
<br><br>
The page you were requesting The page you were requesting
"<%= $self->req->url->path || '/' %>" "<%= $self->req->url->path || '/' %>"
could not be found. could not be found.

View File

@@ -2,7 +2,7 @@
% content_for 'module' => begin % content_for 'module' => begin
<div id="" class=""> <div class="card-body">
<p><br>dev<br> Oups !!! <p><br>dev<br> Oups !!!
The page you were requesting The page you were requesting
"<%= $self->req->url->path || '/' %>" "<%= $self->req->url->path || '/' %>"

View File

@@ -6,7 +6,7 @@
% content_for 'module' => begin % content_for 'module' => begin
<div> <div class="card-body">
% if (config->{debug} == 1) { % if (config->{debug} == 1) {
<pre> <pre>

View File

@@ -1,7 +1,6 @@
<div> <div>
<!--<HR class="">--> <!--<HR class="">-->
<a href="https://mojolicious.org" target="_blank"><img src="images/sme-mojo-logo-white.png" style="position:relative;"></a> <a href="https://mojolicious.org" target="_blank"><img src="images/sme-mojo-logo-white.png" style="position:relative;"></a>
<font>
% if ( $c->is_logged_in && $c->is_admin) { % if ( $c->is_logged_in && $c->is_admin) {
SME Server <%= session 'releaseVersion' %>-<%= $c->app->VERSION %> Manager II SME Server <%= session 'releaseVersion' %>-<%= $c->app->VERSION %> Manager II
% my $mode; % my $mode;
@@ -11,4 +10,3 @@
<br>Copyright 1999-2006 Mitel Corporation<br> <br>Copyright 1999-2006 Mitel Corporation<br>
%= session 'copyRight' %= session 'copyRight'
<br>Copyright (c) 2013-2024 Koozali Foundation Inc.<br> <br>Copyright (c) 2013-2024 Koozali Foundation Inc.<br>
</font>

View File

@@ -1,4 +1,4 @@
<!-- card footer --> <!-- card footer -->
<div class="card-footer">Footer</div> <div class="card-footer">Card Footer</div>
<!-- /.card-footer--> <!-- /.card-footer-->

View File

@@ -1,6 +1,6 @@
<div class="card-header"> <div class="card-header">
<h3 class="card-title">Card Title <%= $title%></h3> <h3 class="card-title">Card Title - <%= $title%></h3>
%= include 'partials/_panel_card_tools' %= include 'partials/_panel_card_tools'

View File

@@ -1,5 +1,7 @@
<!--
<div class="card-tools"> <div class="card-tools">
<button type="button" class="btn btn-tool" data-lte-toggle="card-collapse" <button type="button" class="btn btn-tool" data-lte-toggle="card-collapse"
title="Collapse"> title="Collapse">
<i data-lte-icon="expand" class="bi bi-plus-lg"></i> <i data-lte-icon="expand" class="bi bi-plus-lg"></i>
@@ -10,3 +12,4 @@
<i class="bi bi-x-lg"></i> <i class="bi bi-x-lg"></i>
</button> </button>
</div> </div>
-->

View File

@@ -1,12 +1,12 @@
<div> <div>
<table class="table table-bordered"> <table class="table table-bordered">
<thead>
<tbody>
<tr> <tr>
<th><%= l 'rvw_NETWORKING_PARAMS' %></th> <th><%= l 'rvw_NETWORKING_PARAMS' %></th>
<th>&nbsp</th> <th>&nbsp</th>
</tr> </tr>
</thead>
<tbody>
<tr> <tr>
<td><%= l 'rvw_SERVER_MODE' %></td> <td><%= l 'rvw_SERVER_MODE' %></td>
<td><%= $rvw_datas->{servermode} %></td> <td><%= $rvw_datas->{servermode} %></td>
@@ -28,7 +28,6 @@
<td><%= l 'rvw_GATEWAY'%></td> <td><%= l 'rvw_GATEWAY'%></td>
<td> <td>
<%= $rvw_datas->{gateway} %> <%= $rvw_datas->{gateway} %>
<%= $rvw_datas->{serveronly} %> <%= $rvw_datas->{serveronly} %>
</td> </td>
</tr> </tr>
@@ -42,14 +41,17 @@
<td><%= l 'rvw_DHCP_SERVER' %></td> <td><%= l 'rvw_DHCP_SERVER' %></td>
<td><%= $rvw_datas->{dhcpserver} %></td> <td><%= $rvw_datas->{dhcpserver} %></td>
</tr> </tr>
</tbody>
</table>
<tr><td>&nbsp</td><td>&nbsp</td></tr> <table class="table table-bordered">
<thead>
<tr> <tr>
<th><%= l 'rvw_SERVER_NAMES' %></th> <th><%= l 'rvw_SERVER_NAMES' %></th>
<td>&nbsp</td> <th>&nbsp</th>
</tr> </tr>
</thead>
<tbody>
<tr> <tr>
<td><%= l 'rvw_DNS_SERVER' %></td> <td><%= l 'rvw_DNS_SERVER' %></td>
<td><%= $rvw_datas->{dnsserver} %></td> <td><%= $rvw_datas->{dnsserver} %></td>
@@ -74,14 +76,17 @@
<td><%= l 'rvw_SMTP_POP_AND_IMAP_MAIL_SERVERS' %></td> <td><%= l 'rvw_SMTP_POP_AND_IMAP_MAIL_SERVERS' %></td>
<td><%= $rvw_datas->{smtpserver} %></tr> <td><%= $rvw_datas->{smtpserver} %></tr>
</tr> </tr>
</tbody>
</table>
<tr><td>&nbsp</td><td>&nbsp</td></tr> <table class="table table-bordered">
<thead>
<tr> <tr>
<th><%= l 'rvw_DOMAIN_INFORMATION' %></th> <th><%= l 'rvw_DOMAIN_INFORMATION' %></th>
<td>&nbsp</td> <th>&nbsp</th>
</tr> </tr>
</thead>
<tbody>
<tr> <tr>
<td><%= l 'rvw_PRIMARY_DOMAIN' %></td> <td><%= l 'rvw_PRIMARY_DOMAIN' %></td>
<td><%= $rvw_datas->{domainname} %></td> <td><%= $rvw_datas->{domainname} %></td>
@@ -110,11 +115,7 @@
<td><%= l 'rvw_EMAIL_ADDRESSES' %></td> <td><%= l 'rvw_EMAIL_ADDRESSES' %></td>
<td><%= $rvw_datas->{emailaddresses} %></td> <td><%= $rvw_datas->{emailaddresses} %></td>
</tr> </tr>
<tr>
<td></td>
<td></td>
</tr>
</tbody </tbody>
</table> </table>
</div> </div>

View File

@@ -1,40 +1,34 @@
<!-- Both Theme drop downs but only the first works curently --> <!-- Both Theme drop downs but only the first works curently -->
<div id=""> <div>
% my $btn = l('swt_THEME'); %# content_for 'module' => begin
%= form_for $c->url_for('swttheme') => (method => 'POST') => begin
% my $value = $c->session->{'CurrentTheme'}; % my $value = $c->session->{'CurrentTheme'};
% $value = session 'CurrentTheme'; % $value = session 'CurrentTheme';
% param 'Theme' => $value unless param 'Theme';
%= select_field 'Theme' => $c->theme_list(), class => ""
%= hidden_field 'From' => $c->tx->req->url
%= submit_button "$btn"
</div>
%# my $value = $c->session->{'CurrentTheme'};
% $value = session 'CurrentTheme';
% my $formUrl = $c->url_for('swttheme'); % my $formUrl = $c->url_for('swttheme');
% param 'Theme' => $value unless param 'Theme'; % param 'Theme' => $value unless param 'Theme';
% my @themes = $c->theme_list();
%# my @themes = $c->theme_list();
%#= dumper $c
%#= my $size = keys ($c->theme_list)
% my @themeList = $c->theme_list();
%# = dumper @themeList
% my @themes = $themeList[0];
% param 'Theme' => $value unless param 'Theme';
<form action="<%= $formUrl %>" method="POST" > <form action="<%= $formUrl %>" method="POST" >
<div class="row g-3 align-items-center"> <div class="row g-3 align-items-center">
<div class="col-auto"> <div class="col-auto">
<label class="visually-hidden" for="inlineFormSelectPref">Preference</label> <label class="visually-hidden" for="inlineFormSelectPref">Preference</label>
<select class="form-select" id="inlineFormSelectPref">
<option selected><%= $value %></option> %= select_field 'Theme' => $c->theme_list(), class => "form-select"
% foreach my $theme (@themes) {
<option value="<%= $theme %>"><%= $theme %></option>
% };
</select>
%= hidden_field 'From' => $c->tx->req->url %= hidden_field 'From' => $c->tx->req->url
</div> </div>
@@ -45,4 +39,7 @@
</form> </form>
% end %# end
</div>

View File

@@ -5,10 +5,9 @@
%= form_for '/useraccounts' => (method => 'POST') => begin %= form_for '/useraccounts' => (method => 'POST') => begin
<p> <div>
<br> <button type="submit" class="btn btn-primary"><%= $btn %> </button>
%= submit_button "$btn", class => "" </div>
</p>
% end % end
@@ -40,7 +39,8 @@
%=l 'ACTION' %=l 'ACTION'
</th> </th>
</tr> </tr>
</thead><tbody> </thead>
<tbody>
% foreach my $user (@$users) { % foreach my $user (@$users) {
@@ -56,10 +56,11 @@
% my $password_set = $user->prop('PasswordSet'); % my $password_set = $user->prop('PasswordSet');
<tr> <tr>
%= t td => (class => "") => $username <td><%= $username %></td>
%= t td => (class => "") => "$first $last" <td><%=$first %>&nbsp<%=$last %></td>
%= t td => (class => "") => $vpnaccess <td><%= $vpnaccess %></td>
%= t td => (class => "") => $fwd <td><%= $fwd %></td>
% my ($actionModify, $actionLock, $actionResetPw, $actionRemove,$actionroundcube) = '&nbsp;'; % my ($actionModify, $actionLock, $actionResetPw, $actionRemove,$actionroundcube) = '&nbsp;';
% my $modify_text = l('MODIFY'); # Localized text % my $modify_text = l('MODIFY'); # Localized text
% my $csrf_token = "TOKEN"; # CSRF token for security % my $csrf_token = "TOKEN"; # CSRF token for security
@@ -68,35 +69,35 @@
%if ($useraccounts_user_name eq 'admin') { %if ($useraccounts_user_name eq 'admin') {
%$actionModify = qq{ %$actionModify = qq{
%<a href="useraccountsd?CsrfDef=$csrf_token&trt=UPS&user=$useraccounts_user_name"> %<a href="useraccountsd?CsrfDef=$csrf_token&trt=UPS&user=$useraccounts_user_name">
% <button type='button' class="" title='$modify_text'> % <button type='button' class="btn btn-primary" title='$modify_text'>
% $modify_text % $modify_text
% </button> % </button>
%</a> %</a>&nbsp;
%}; %};
%$actionResetPw = qq{ %$actionResetPw = qq{
%<a href="useraccountsd?CsrfDef=$csrf_token&trt=PWS&user=$useraccounts_user_name"> %<a href="useraccountsd?CsrfDef=$csrf_token&trt=PWS&user=$useraccounts_user_name">
% <button type='button' class="" title='$password_text' > % <button type='button' class="btn btn-primary" title='$password_text' >
% $password_text % $password_text
% </button> % </button>
%</a> %</a>&nbsp;
%}; %};
%} else { %} else {
%$actionModify = qq{ %$actionModify = qq{
%<a href="useraccountsd?CsrfDef=$csrf_token&trt=UPD&user=$useraccounts_user_name"> %<a href="useraccountsd?CsrfDef=$csrf_token&trt=UPD&user=$useraccounts_user_name">
% <button type='button' class="" title='$modify_text' > % <button type='button' class="btn btn-primary" title='$modify_text' >
% $modify_text % $modify_text
% </button> % </button>
%</a> %</a>&nbsp;
%}; %};
%} %}
%if ($password_set ne 'yes') { %if ($password_set ne 'yes') {
%$actionLock = l('ACCOUNT_LOCKED'); %$actionLock = l('ACCOUNT_LOCKED');
%$actionResetPw = qq{ %$actionResetPw = qq{
%<a href="useraccountsd?CsrfDef=$csrf_token&trt=PWD&user=$useraccounts_user_name"> %<a href="useraccountsd?CsrfDef=$csrf_token&trt=PWD&user=$useraccounts_user_name">
% <button type='button' class="" title="$password_text - currently unset" style = background:pink; > % <button type='button' class="btn btn-primary" title="$password_text - currently unset" style = background:pink; >
% $password_text % $password_text
% </button> % </button>
%</a> %</a>&nbsp;
%}; %};
%} elsif ($useraccounts_user_name ne 'admin') { %} elsif ($useraccounts_user_name ne 'admin') {
% my $lock_text = l('ACCOUNT LOCKED'); # Localized text % my $lock_text = l('ACCOUNT LOCKED'); # Localized text
@@ -104,17 +105,17 @@
% my $useraccounts_user_name = $user->key; # useraccountss_entry name extracted from the data structure % my $useraccounts_user_name = $user->key; # useraccountss_entry name extracted from the data structure
%$actionLock = qq{ %$actionLock = qq{
%<a href="useraccountsd?CsrfDef=$csrf_token&trt=LCK&user=$useraccounts_user_name"> %<a href="useraccountsd?CsrfDef=$csrf_token&trt=LCK&user=$useraccounts_user_name">
% <button type='button' class="" title='$lock_text' > % <button type='button' class="btn btn-primary" title='$lock_text' >
% $lock_text % $lock_text
% </button> % </button>
%</a> %</a>&nbsp;
%}; %};
%$actionResetPw = qq{ %$actionResetPw = qq{
%<a href="useraccountsd?CsrfDef=$csrf_token&trt=PWD&user=$useraccounts_user_name"> %<a href="useraccountsd?CsrfDef=$csrf_token&trt=PWD&user=$useraccounts_user_name">
% <button type='button' class="" title='$password_text' > % <button type='button' class="btn btn-primary" title='$password_text' >
% $password_text % $password_text
% </button> % </button>
%</a> %</a>&nbsp;
%}; %};
%} %}
%if ( $removable eq 'yes' ) { %if ( $removable eq 'yes' ) {
@@ -122,10 +123,10 @@
% my $csrf_token = "TOKEN"; # CSRF token for security % my $csrf_token = "TOKEN"; # CSRF token for security
%$actionRemove = qq{ %$actionRemove = qq{
%<a href="useraccountsd?CsrfDef=$csrf_token&trt=DEL&user=$useraccounts_user_name"> %<a href="useraccountsd?CsrfDef=$csrf_token&trt=DEL&user=$useraccounts_user_name">
% <button type='button' class="" title='$remove_text' > % <button type='button' class="btn btn-primary" title='$remove_text' >
% $remove_text % $remove_text
% </button> % </button>
%</a> %</a>&nbsp;
%}; %};
%} %}
@@ -135,12 +136,12 @@
% $useraccounts_user_name = $user->key; # useraccountss_entry name extracted from the data structure % $useraccounts_user_name = $user->key; # useraccountss_entry name extracted from the data structure
% $actionroundcube = qq{ % $actionroundcube = qq{
%<a href="roundcubepanel?CsrfDef=$csrf_token&url=https://$thisdomain/roundcube?_user=$useraccounts_user_name&height=600px"> %<a href="roundcubepanel?CsrfDef=$csrf_token&url=https://$thisdomain/roundcube?_user=$useraccounts_user_name&height=600px">
% <button type='button' class="" title='$roundcube_text' > % <button type='button' class="btn btn-primary" title='$roundcube_text' >
% $roundcube_text % $roundcube_text
% </button> % </button>
%</a> %</a>&nbsp;
%}; %};
<td class=""> <td>
<%= $c->render_to_string(inline => $actionModify) %> <%= $c->render_to_string(inline => $actionModify) %>
<%= $c->render_to_string(inline => $actionResetPw) %> <%= $c->render_to_string(inline => $actionResetPw) %>
<%= $c->render_to_string(inline => $actionLock) %> <%= $c->render_to_string(inline => $actionLock) %>
@@ -157,3 +158,8 @@
%= hidden_field 'trt' => $usr_datas->{trt} %= hidden_field 'trt' => $usr_datas->{trt}
</div> </div>
<div>
</div>

View File

@@ -1,3 +1,99 @@
% content_for 'module' => begin
<div class="container-sm">
<br>
<h2><%= l 'usr_MODIFY_ADMIN_TITLE' %></h2>
<%= l 'usr_ACCOUNT_NAME' %> : <%= $usr_datas->{user} %>
<form>
% param 'FirstName' => $usr_datas->{firstname} unless param 'FirstName';
<div class="row g-3 align-items-center">
<div class="col-auto p-33">
<label for="inputFirstName" class="col-form-label"><%= l 'usr_FIRSTNAME' %></label>
</div>
<div class="col-auto p-3">
<input type="text" id="inputFirstName" class="form-control" aria-describedby="FirstName" value=<%= $usr_datas->{firstname} %> >
</div>
<div class="col-auto p-3">
<span id="passwordHelpInline" class="form-text">
First Name
</span>
</div>
</div>
% param 'LastName' => $usr_datas->{lastname} unless param 'LastName';
<div class="row g-3 align-items-center">
<div class="col-auto p-33">
<label for="inputLastNAme" class="col-form-label"><%= l 'usr_LASTNAME' %></label>
</div>
<div class="col-auto p-3">
<input type="text" id="inputLastName" class="form-control" aria-describedby="LastName" value=<%= $usr_datas->{lastname} %>>
</div>
<div class="col-auto p-3">
<span id="passwordHelpInline" class="form-text">
Last Name
</span>
</div>
</div>
% param 'EmailForward' => $usr_datas->{emailforward} unless param 'EmailForward';
<div class="row g-3 align-items-center">
<div class="col-auto p-33">
<label for="inputEmailDelivery" class="col-form-label"><%= l 'usr_EMAIL_DELIVERY' %></label>
</div>
<div class="col-auto p-3">
%= select_field 'EmailForward' => $c->emailForward_list(), class => "form-select"
</div>
% param 'ForwardAddress' => $usr_datas->{forwardaddress} unless param 'ForwardAddress';
<div class="row g-3 align-items-center">
<div class="col-auto">
<label for="inputForwardAddress" class="col-form-label"><%= l 'usr_FORWARDING_ADDRESS' %></label>
</div>
<div class="col-auto">
<input type="password" id="inputPassword6" class="form-control" aria-describedby="passwordHelpInline">
</div>
<div class="col-auto">
<span id="passwordHelpInline" class="form-text">
Email forwarding address
</span>
</div>
</div>
% param 'VPNClientAccess' => $usr_datas->{vpnclientaccess} unless param 'VPNClientAccess';
<div class="row g-3 align-items-center">
<div class="col-auto p-33">
<label for="inputVPNClientAccess" class="col-form-label"><%= l 'usr_VPN_CLIENT_ACCESS' %></label>
</div>
<div class="col-auto p-3">
%= select_field 'VPNClientAccess' => [[ (l 'NO') => 'no'], [ (l 'YES') => 'yes']], class => "form-select"
</div>
<div class="row g-3 align-items-center">
<div class="col-auto p-33">
<button type="submit" class="btn btn-primary">Save</button>
</div>
</div>
</form>
% end
</div>
<div> <div>
% my $btn = l('SAVE'); % my $btn = l('SAVE');

View File

@@ -1,7 +1,8 @@
% layout 'AdminLTE', title => "Sme server 2 - Port Forwards"; % layout 'AdminLTE', title => "Sme server 2 - Port Forwards";
% content_for 'module' => begin % content_for 'module' => begin
<div>
<div class="card-body">
% if (config->{debug} == 1) { % if (config->{debug} == 1) {
<p> <p>

View File

@@ -1,7 +1,8 @@
% layout 'AdminLTE', title => "Sme server 2 - printers"; % layout 'AdminLTE', title => "Sme server 2 - printers";
% content_for 'module' => begin % content_for 'module' => begin
<div id="" class="">
<div class="card-body">
%if (config->{debug} == 1) { %if (config->{debug} == 1) {
<p> <p>

View File

@@ -1,7 +1,9 @@
% layout 'AdminLTE', title => "Sme server 2 - proxy"; % layout 'AdminLTE', title => "Sme server 2 - proxy";
% content_for 'module' => begin % content_for 'module' => begin
<div id="" class="">
<div class="card-body">
%if (config->{debug} == 1) { %if (config->{debug} == 1) {
<p>(DBG)route: <%= $c->current_route %><br> <p>(DBG)route: <%= $c->current_route %><br>
(DBG)ht stat: <%= $prx_datas->{http_proxy_status}%> <br> (DBG)ht stat: <%= $prx_datas->{http_proxy_status}%> <br>

View File

@@ -1,7 +1,8 @@
% layout 'AdminLTE', title => "Sme server 2 - pseudonyms"; % layout 'AdminLTE', title => "Sme server 2 - pseudonyms";
% content_for 'module' => begin % content_for 'module' => begin
<div class="">
<div class="card-body">
% if (config->{debug} == 1) { % if (config->{debug} == 1) {
<p> <p>

View File

@@ -1,7 +1,12 @@
% layout 'AdminLTE', title => "Sme server 2 - qmailanalog"; % layout 'AdminLTE', title => "Sme server 2 - qmailanalog";
% content_for 'module' => begin % content_for 'module' => begin
<!-- should be moved -->
%= javascript '/js/qmailanalog.js' %= javascript '/js/qmailanalog.js'
<div>
<div class="card-body">
%if (config->{debug} == 1) { %if (config->{debug} == 1) {
<p> <p>
(DBG)route: <%= $c->current_route %><br> (DBG)route: <%= $c->current_route %><br>

View File

@@ -1,7 +1,8 @@
% layout 'AdminLTE', title => "Sme server 2 - quota"; % layout 'AdminLTE', title => "Sme server 2 - quota";
% content_for 'module' => begin % content_for 'module' => begin
<div>
<div class="card-body">
% if (config->{debug} == 1) { % if (config->{debug} == 1) {
<p> <p>

View File

@@ -2,7 +2,7 @@
% content_for 'module' => begin % content_for 'module' => begin
<div id="" class=""> <div class="card-body">
%if (config->{debug} == 1) { %if (config->{debug} == 1) {
<p> <p>

View File

@@ -1,7 +1,8 @@
% layout 'AdminLTE', title => "Sme server 2 - remoteaccess"; % layout 'AdminLTE', title => "Sme server 2 - remoteaccess";
% content_for 'module' => begin % content_for 'module' => begin
<div>
<div class="card-body">
% if (config->{debug} == 1) { % if (config->{debug} == 1) {
<p> <p>

View File

@@ -3,11 +3,7 @@
% content_for 'module' => begin % content_for 'module' => begin
%#= include 'partials/_panel_card_top' <div class="card-body">
%#= include 'partials/_panel_card_header'
<div>
<h1> <%= $title %> </h1> <h1> <%= $title %> </h1>
<!-- Header text --> <!-- Header text -->
@@ -26,7 +22,5 @@
</div> </div>
%#= include 'partials/_panel_card_footer'
%#= include 'partials/_panel_card_bottom'
% end % end

View File

@@ -3,7 +3,8 @@
% content_for 'module' => begin % content_for 'module' => begin
<div id="" class=""> <div class="card-body">
% if (config->{debug} == 1) { % if (config->{debug} == 1) {
<p> <p>
%= dumper $c->current_route %= dumper $c->current_route

View File

@@ -1,10 +1,12 @@
% layout 'AdminLTE', title => 'Sme server 2 - Support'; % layout 'AdminLTE', title => 'Sme server 2 - Support';
% content_for 'module' => begin % content_for 'module' => begin
<div id="" class="">
<div class="card-body">
<p> < %= $title % ></p> <p> < %= $title % ></p>
<br> <br>
<%= $modul %> <%= $modul %>
<br> <br>
</div> </div>
%end %end

View File

@@ -2,8 +2,8 @@
% content_for 'module' => begin % content_for 'module' => begin
%= include 'partials/_panel_card_top' %#= include 'partials/_panel_card_top'
%= include 'partials/_panel_card_header' %#= include 'partials/_panel_card_header'
<div class="card-body"> <div class="card-body">
<!-- /.card-body --> <!-- /.card-body -->
@@ -43,8 +43,8 @@
</div> </div>
%= include 'partials/_panel_card_footer' %#= include 'partials/_panel_card_footer'
%= include 'partials/_panel_card_bottom' %#= include 'partials/_panel_card_bottom'
%end %end

View File

@@ -2,7 +2,7 @@
% content_for 'module' => begin % content_for 'module' => begin
<div> <div class="card-body">
% if (config->{debug} == 1) { % if (config->{debug} == 1) {
<p> <p>

View File

@@ -1,7 +1,9 @@
% layout 'AdminLTE', title => "Sme server 2 - viewlogfiles"; % layout 'AdminLTE', title => "Sme server 2 - viewlogfiles";
% content_for 'module' => begin % content_for 'module' => begin
<div>
<div class="card-body">
%if (config->{debug} == 1) { %if (config->{debug} == 1) {
<p> <p>
(DBG)route: <%= $c->current_route %><br> (DBG)route: <%= $c->current_route %><br>

View File

@@ -2,7 +2,7 @@
% content_for 'module' => begin % content_for 'module' => begin
<div> <div class="card-body">
% if (config->{debug} == 1) { % if (config->{debug} == 1) {
<p> <p>

View File

@@ -1,7 +1,9 @@
% layout 'AdminLTE', title => 'Sme server 2 - IndexT'; % layout 'AdminLTE', title => 'Sme server 2 - IndexT';
% content_for 'module' => begin % content_for 'module' => begin
<div>
<div class="card-body">
<p>Index on line - Welcome page <p>Index on line - Welcome page
<br> <br>
</p> </p>

View File

@@ -2,7 +2,7 @@
% content_for 'module' => begin % content_for 'module' => begin
<div> <div class="card-body">
<p><br>dev<br> What else !!! <p><br>dev<br> What else !!!
The page you were requesting The page you were requesting
"<%= $self->req->url->path || '/' %>" "<%= $self->req->url->path || '/' %>"

View File

@@ -1,7 +1,8 @@
% layout 'AdminLTE', title => "Sme server 2 - workgroup"; % layout 'AdminLTE', title => "Sme server 2 - workgroup";
% content_for 'module' => begin % content_for 'module' => begin
<div>
<div class="card-body">
%if (config->{debug} == 1) { %if (config->{debug} == 1) {
<p> <p>

View File

@@ -2,7 +2,8 @@
% content_for 'module' => begin % content_for 'module' => begin
<div> <div class="card-body">
% if (config->{debug} == 1) { % if (config->{debug} == 1) {
<p> <p>
%= dumper $c->current_route %= dumper $c->current_route

View File

@@ -2,7 +2,8 @@
% content_for 'module' => begin % content_for 'module' => begin
<div> <div class="card-body">
% if (config->{debug} == 1) { % if (config->{debug} == 1) {
<p> <p>
%= dumper $c->current_route %= dumper $c->current_route

View File

@@ -2,7 +2,8 @@
% content_for 'module' => begin % content_for 'module' => begin
<div> <div class="card-body">
% if (config->{debug} == 1) { % if (config->{debug} == 1) {
<p> <p>
%= dumper $c->current_route %= dumper $c->current_route

View File

@@ -6,7 +6,8 @@
% content_for 'module' => begin % content_for 'module' => begin
<div> <div class="card-body">
% if (config->{debug} == 1) { % if (config->{debug} == 1) {
<p> <p>
%= dumper $c->current_route %= dumper $c->current_route

View File

@@ -2,7 +2,8 @@
% content_for 'module' => begin % content_for 'module' => begin
<div> <div class="card-body">
% if (config->{debug} == 1) { % if (config->{debug} == 1) {
<p> <p>
%= dumper $c->current_route %= dumper $c->current_route

View File

@@ -2,7 +2,8 @@
% content_for 'module' => begin % content_for 'module' => begin
<div> <div class="card-body">
% if (config->{debug} == 1) { % if (config->{debug} == 1) {
<p> <p>
%= dumper $c->current_route %= dumper $c->current_route

View File

@@ -2,7 +2,8 @@
% content_for 'module' => begin % content_for 'module' => begin
<div> <div class="card-body">
% if (config->{debug} == 1) { % if (config->{debug} == 1) {
<p> <p>
%= dumper $c->current_route %= dumper $c->current_route

View File

@@ -1,6 +1,6 @@
%define name smeserver-manager-AdminLTE %define name smeserver-manager-AdminLTE
%define version 11.0.0 %define version 11.0.0
%define release 7 %define release 9
Summary: AdminLTE is an html framework for admin consoles - this rpm adds it to smeserver manager2 Summary: AdminLTE is an html framework for admin consoles - this rpm adds it to smeserver manager2
Name: %{name} Name: %{name}
Version: %{version} Version: %{version}
@@ -26,6 +26,16 @@ AdminLTE is an html framework for admin consoles
wget https://github.com/ColorlibHQ/AdminLTE/archive/master.zip wget https://github.com/ColorlibHQ/AdminLTE/archive/master.zip
%changelog %changelog
* Sat Apr 19 2025 John Crisp <jcrisp@safeandsoundit.co.uk> 11.0.0-9.sme
- Starting to update forms
- Moving as much formatting to simple html as possible
- Use Mojo helpers for some parts eg theme chooser - may come back to that
* Fri Apr 18 2025 John Crisp <jcrisp@safeandsoundit.co.uk> 11.0.0-8.sme
- More cleanup
- Add Card support across all panels except login
- Disabled minimise and remove Card icons
* Thu Apr 17 2025 John Crisp <jcrisp@safeandsoundit.co.uk> 11.0.0-7.sme * Thu Apr 17 2025 John Crisp <jcrisp@safeandsoundit.co.uk> 11.0.0-7.sme
- Clean up review template (but footer in the wrong place) - Clean up review template (but footer in the wrong place)
- Fix typo tabel - Fix typo tabel