* Sat Sep 13 2025 Brian Read <brianr@koozali.org> 11.0.0-115.sme

- Fix login and logout and user table buttons so that they are valid html and work for elinks [SME: 13113]
This commit is contained in:
2025-09-14 11:31:59 +01:00
parent 687e763684
commit a0524a7484
3 changed files with 76 additions and 62 deletions

View File

@@ -2,9 +2,10 @@
<div id="header2" class="hd2 module gradient-panel"> <div id="header2" class="hd2 module gradient-panel">
<img src="images/KoozaliServerManager.png" alt="Koozali Logo" class="logo" > <img src="images/KoozaliServerManager.png" alt="Koozali Logo" class="logo" >
% if ( not defined $c->session->{username} ) { % if ( not defined $c->session->{username} ) {
<button type='button' class="login-button"><a class = "no-visited-state" target="_parent" href="login">Login</a></button> <a class="login-button no-visited-state" target="_parent" href="/smanager/login">Login</a>
% } else { % } else {
<button type='button' class="login-button"><a class = "no-visited-state" target="_parent" href="logout">Logout <%= $c->session->{username} %></a></button> <!--><button type='button' class="login-button"><a class = "no-visited-state" target="_parent" href="/smanager/logout">Logout <%= $c->session->{username} %></a></button>-->
<a class="login-button no-visited-state" target="_parent" href="/smanager/logout">Logout <%= $c->session->{username} %></a>
% } % }
<div id="flag-container" class = "flag-style"> <div id="flag-container" class = "flag-style">
<!-- The flag icon will be inserted here --> <!-- The flag icon will be inserted here -->

View File

@@ -66,53 +66,60 @@
% my $password_text = l("PASSWORD_RESET"); % my $password_text = l("PASSWORD_RESET");
% 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='sme-modify-button' title='$modify_text'> % class="sme-modify-button ui-button ui-corner-all ui-widget ui-button-icon-only"
% $modify_text % title="$modify_text" aria-label="$modify_text">
% </button> % <span class="ui-icon ui-icon-pencil"></span>
% <span class="ui-button-text">$modify_text</span>
% </a> % </a>
% }; % };
% $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='sme-password-button' title='$password_text' > % class="sme-password-button ui-button ui-corner-all ui-widget ui-button-icon-only"
% $password_text % title="$password_text" aria-label="$password_text">
% </button> % <span class="ui-icon ui-icon-refresh"></span>
% <span class="ui-button-text">$password_text</span>
% </a> % </a>
% }; % };
% } 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='sme-modify-button' title='$modify_text' > % class="sme-modify-button ui-button ui-corner-all ui-widget ui-button-icon-only"
% $modify_text % title="$modify_text" aria-label="$modify_text">
% </button> % <span class="ui-icon ui-icon-pencil"></span>
% <span class="ui-button-text">$modify_text</span>
% </a> % </a>
% }; % };
% } % }
% 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='sme-password-button unset' title="$password_text - currently unset" style = background:pink; > % class="sme-password-button unset ui-button ui-corner-all ui-widget ui-button-icon-only"
% $password_text % title="$password_text - currently unset" aria-label="$password_text - currently unset"
% </button> % style="background:pink;">
% <span class="ui-icon ui-icon-refresh"></span>
% <span class="ui-button-text">$password_text</span>
% </a> % </a>
% }; % };
% } elsif ($useraccounts_user_name ne 'admin') { % } elsif ($useraccounts_user_name ne 'admin') {
% my $lock_text = l('ACCOUNT LOCKED'); # Localized text % my $lock_text = l('LOCK_ACCOUNT'); # Localized text
% my $csrf_token = "TOKEN"; # CSRF token for security % my $csrf_token = "TOKEN"; # CSRF token for security
% 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='sme-lock-button' title='$lock_text' > % class="sme-lock-button ui-button ui-corner-all ui-widget ui-button-icon-only"
% $lock_text % title="$lock_text" aria-label="$lock_text">
% </button> % <span class="ui-icon ui-icon-locked"></span>
% <span class="ui-button-text">$lock_text</span>
% </a> % </a>
% }; % };
% $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='sme-password-button' title='$password_text' > % class="sme-password-button ui-button ui-corner-all ui-widget ui-button-icon-only"
% $password_text % title="$password_text" aria-label="$password_text">
% </button> % <span class="ui-icon ui-icon-refresh"></span>
% <span class="ui-button-text">$password_text</span>
% </a> % </a>
% }; % };
% } % }
@@ -120,10 +127,11 @@
% my $remove_text = l('REMOVE'); # Localized text % my $remove_text = l('REMOVE'); # Localized text
% 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='sme-remove-button' title='$remove_text' > % class="sme-remove-button ui-button ui-corner-all ui-widget ui-button-icon-only"
% $remove_text % title="$remove_text" aria-label="$remove_text">
% </button> % <span class="ui-icon ui-icon-trash"></span>
% <span class="ui-button-text">$remove_text</span>
% </a> % </a>
% }; % };
% } % }
@@ -133,10 +141,11 @@
% $csrf_token = "TOKEN"; # CSRF token for security % $csrf_token = "TOKEN"; # CSRF token for security
% $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='sme-email-button' title='$roundcube_text' > % class="sme-email-button ui-button ui-corner-all ui-widget ui-button-icon-only"
% $roundcube_text % title="$roundcube_text" aria-label="$roundcube_text">
% </button> % <span class="ui-icon ui-icon-mail-closed"></span>
% <span class="ui-button-text">$roundcube_text</span>
% </a> % </a>
% }; % };
<td class='sme-border' style="min-width:35em"> <td class='sme-border' style="min-width:35em">

View File

@@ -2,7 +2,7 @@ Summary: Sme Server Configuration : Manager 2
%define name smeserver-manager %define name smeserver-manager
Name: %{name} Name: %{name}
%define version 11.0.0 %define version 11.0.0
%define release 114 %define release 115
Version: %{version} Version: %{version}
Release: %{release}%{?dist} Release: %{release}%{?dist}
License: GPL License: GPL
@@ -35,6 +35,7 @@ Requires: perl(Mojolicious::Plugin::CSRFDefender) >= 0.0.8
Requires: perl(Net::Netmask) >= 1.9 Requires: perl(Net::Netmask) >= 1.9
Requires: perl(DBM::Deep) >= 2.0011-1 Requires: perl(DBM::Deep) >= 2.0011-1
Requires: perl(Mojo::JWT) >= 0.08-1 Requires: perl(Mojo::JWT) >= 0.08-1
#Requires: perl(IPS:Run) >= 0.99-1 - needed for enahnced qmailanalog run of pflogsumm
#Requires: perl(Time::TAI64) >= 2.11 #Requires: perl(Time::TAI64) >= 2.11
Requires: perl(Data::Validate::IP) Requires: perl(Data::Validate::IP)
Requires: mutt >= 1.5.21 Requires: mutt >= 1.5.21
@@ -146,6 +147,9 @@ true
%defattr(-,root,root) %defattr(-,root,root)
%changelog %changelog
* Sat Sep 13 2025 Brian Read <brianr@koozali.org> 11.0.0-115.sme
- Fix login and logout and user table buttons so that they are valid html and work for elinks [SME: 13113]
* Sat Sep 13 2025 Brian Read <brianr@koozali.org> 11.0.0-114.sme * Sat Sep 13 2025 Brian Read <brianr@koozali.org> 11.0.0-114.sme
- edit intial screen to suppress reconfig message unless admin logged in [SME: 13112] - edit intial screen to suppress reconfig message unless admin logged in [SME: 13112]