From b58f82a332b2ef6618ef0f8f6ae8c797d39e9128 Mon Sep 17 00:00:00 2001 From: Brian Read Date: Wed, 18 Dec 2024 12:08:00 +0000 Subject: [PATCH] Fix up user and localnetwork panels and stop menu moving betweek proxy and reboot --- .../smanager/lib/SrvMngr/Controller/Proxy.pm | 4 +-- .../templates/partials/_ln_list.html.ep | 28 +++++++++++-------- .../templates/partials/_usr_list.html.ep | 26 +++++++++++------ smeserver-manager.spec | 6 +++- 4 files changed, 40 insertions(+), 24 deletions(-) diff --git a/root/usr/share/smanager/lib/SrvMngr/Controller/Proxy.pm b/root/usr/share/smanager/lib/SrvMngr/Controller/Proxy.pm index ad24c95..b15e0e1 100644 --- a/root/usr/share/smanager/lib/SrvMngr/Controller/Proxy.pm +++ b/root/usr/share/smanager/lib/SrvMngr/Controller/Proxy.pm @@ -3,7 +3,7 @@ package SrvMngr::Controller::Proxy; #---------------------------------------------------------------------- # heading : System # description : Proxy settings -# navigation : 4000 700 +# navigation : 4000 710 #---------------------------------------------------------------------- # # routes : end @@ -72,4 +72,4 @@ sub do_update { }; -1; +1; \ No newline at end of file diff --git a/root/usr/share/smanager/themes/default/templates/partials/_ln_list.html.ep b/root/usr/share/smanager/themes/default/templates/partials/_ln_list.html.ep index d4a3184..6e9628a 100644 --- a/root/usr/share/smanager/themes/default/templates/partials/_ln_list.html.ep +++ b/root/usr/share/smanager/themes/default/templates/partials/_ln_list.html.ep @@ -1,7 +1,6 @@
% my $btn = l('ln_LOCALNETWORK_ADD'); %= form_for '/localnetworksa' => (method => 'POST') => begin -

% my $retref= $c->stash("ret"); % my %ret; @@ -68,10 +67,10 @@ %=l 'ROUTER' - + %=l 'ACTION' - + % foreach my $localnetwork (@$localnetworks ) % { @@ -84,18 +83,23 @@ %= t td => (class => 'sme-border') => $localnetwork->prop('Mask') %= t td => (class => 'sme-border') => $num_hosts %= t td => (class => 'sme-border') => $localnetwork->prop('Router') - % if ($removable eq "yes") { - - - % } else { - - %} + %my $actionRemove = ' '; + %if ($removable eq "yes") { + %my $remove_text = l('REMOVE'); # Localized text + %my $local_network_entry = $localnetwork->key; + %my $csrf_token = "TOKEN"; # CSRF token for security + %$actionRemove = qq{ + % + %}; + % } + <%= $c->render_to_string(inline => $actionRemove) %> % } -

- %= hidden_field 'trt' => $ln_datas->{trt} %} -
+ \ No newline at end of file diff --git a/root/usr/share/smanager/themes/default/templates/partials/_usr_list.html.ep b/root/usr/share/smanager/themes/default/templates/partials/_usr_list.html.ep index 98c0bf5..8e7e825 100644 --- a/root/usr/share/smanager/themes/default/templates/partials/_usr_list.html.ep +++ b/root/usr/share/smanager/themes/default/templates/partials/_usr_list.html.ep @@ -59,12 +59,12 @@ %= t td => (class => 'sme-border') => "$first $last" %= t td => (class => 'sme-border') => $vpnaccess %= t td => (class => 'sme-border') => $fwd - %my ($actionModify, $actionLock, $actionResetPw, $actionRemove) = ' '; + %my ($actionModify, $actionLock, $actionResetPw, $actionRemove,$actionroundcube) = ' '; %my $modify_text = l('MODIFY'); # Localized text %my $csrf_token = "TOKEN"; # CSRF token for security %my $useraccounts_user_name = $user->key; # useraccountss_entry name extracted from the data structure %my $password_text = l("PASSWORD_RESET"); - %if ($username eq 'admin') { + %if ($useraccounts_user_name eq 'admin') { %$actionModify = qq{ % %}; @@ -114,18 +114,26 @@ % %}; %} - - % my $thisdomain = session 'SystemName'; - % $thisdomain .= ".".session 'DomainName'; - %# my $thisdomain = "localhost"; + + %my $thisdomain = session 'SystemName'; + %$thisdomain .= ".".session 'DomainName'; + %my $roundcube_text = l('Webmail'); # Localized text + %my $csrf_token = "TOKEN"; # CSRF token for security + %my $useraccounts_user_name = $user->key; # useraccountss_entry name extracted from the data structure + %$actionroundcube = qq{ + % + %}; <%= $c->render_to_string(inline => $actionModify) %> <%= $c->render_to_string(inline => $actionResetPw) %> <%= $c->render_to_string(inline => $actionLock) %> <%= $c->render_to_string(inline => $actionRemove) %> - roundcube?_user=<%= $username %>"> - + <%= $c->render_to_string(inline => $actionroundcube) %> + % } diff --git a/smeserver-manager.spec b/smeserver-manager.spec index 9b15299..a7d8f6d 100644 --- a/smeserver-manager.spec +++ b/smeserver-manager.spec @@ -2,7 +2,7 @@ Summary: Sme server navigation module : manager 2 %define name smeserver-manager Name: %{name} %define version 11.0.0 -%define release 31 +%define release 32 Version: %{version} Release: %{release}%{?dist} License: GPL @@ -115,6 +115,10 @@ true %defattr(-,root,root) %changelog +* Wed Dec 18 2024 Brian Read 11.0.0-32.sme +- Fix for User and localnetwork panel [SME: 6278] +- Fix menu entry for proxy to stop it moving + * Tue Dec 17 2024 Brian Read 11.0.0-31.sme - Edit html to avoid w3c html validation warnings [SME: 6278]