Compare commits

..

2 Commits

Author SHA1 Message Date
774b7ab4ee * Wed Nov 05 2025 Brian Read <brianr@koozali.org> 11.0.0-132.sme
- Supress webmail option on menu and in user accounts if webmail not enabled [SME: 12997]
2025-11-05 12:15:55 +00:00
99dc0a15da * Tue Nov 04 2025 Brian Read <brianr@koozali.org> 11.0.0-131.sme
- Add fix for IE browser local/language detect [SME: 13039]
2025-11-04 16:12:44 +00:00
6 changed files with 43 additions and 28 deletions

View File

@@ -17,6 +17,8 @@ use Data::Validate::IP qw(is_ipv4 is_ipv6);
use constant FALSE => 0;
use constant TRUE => 1;
our @EXPORT_OK = qw(get_current_webmail_status);
#The most common ones - open DB when required.
our $cdb;

View File

@@ -1 +1 @@
'rc_WEBMAIL_DISABLED' => 'Webmail is disabled in Email Settings panel',

View File

@@ -263,8 +263,12 @@ document.addEventListener('DOMContentLoaded', () => {
function displayLocaleAndFlag() {
// Get the browser locale
const userLocale = navigator.language || navigator.userLanguage;
const userLocale = navigator.languages && navigator.languages.length
? navigator.languages[0]
: navigator.language;
//alert(`User Locale: ${userLocale}`); // Alert the detected locale
console.log(navigator.languages); // Log language to console
const { flag, isUnknown, countryCode } = getFlagEmoji(userLocale);

View File

@@ -1,5 +1,7 @@
<div id='usr_list'>
% use constant FALSE => 0;
% use constant TRUE => 1;
% my $btn = l('usr_ADD_USER');
@@ -153,7 +155,9 @@
<%= $c->render_to_string( inline => $actionResetPw ) %>
<%= $c->render_to_string( inline => $actionLock ) %>
<%= $c->render_to_string( inline => $actionRemove ) %>
<%= $c->render_to_string( inline => $actionroundcube ) %>
% if ($c->SrvMngr::Controller::Emailsettings::get_current_webmail_status(FALSE) ne 'disabled'){
<%= $c->render_to_string( inline => $actionroundcube ) %>
% }
</td>
</tr>
% }

View File

@@ -1,8 +1,7 @@
% layout 'default', title => "Sme server 2 - roundcube";
% use constant FALSE => 0;
% use constant TRUE => 1;
% content_for 'module' => begin
<div id='roundcube' class='roundcube roundcube-panel module'>
% if (config->{debug} == 1) {
<p>
@@ -15,26 +14,26 @@
</div>
% }
<h1><%= $title %></h1><br>
<p>If the Webmail panel does not appear after logging in, then please check your password.</p><br />
% my $thisdomain = $c->req->url->to_abs->host;
% my $url = $c->stash('modul');
% if (!$url) {
% $url = $thisdomain . "/roundcube";
% if ($c->SrvMngr::Controller::Emailsettings::get_current_webmail_status(FALSE) eq 'disabled'){
<%= $c->render_to_string( inline => l('rc_WEBMAIL_DISABLED') ) %>
% } else {
<p>If the Webmail panel does not appear after logging in, then please check your password.</p><br />
% my $thisdomain = $c->req->url->to_abs->host;
% my $url = $c->stash('modul');
% if (!$url) {
% $url = $thisdomain . "/roundcube";
% }
% my $username = 'admin';
% if ($url =~ /[?&]_user=([^&]+)/) {
% $username = $1;
% }
% if (!($url =~ /https:/)) {
% $url = 'https://' . $url;
% }
<div class='roundcube'>
<a href="<%= "https://" . $thisdomain . "/" %>roundcube?_user=<%= $username %>"><button class="sme-fullwindow1-button" width=20em title="<%= l('Full Window') %>"><%= l('Full Window') %></button></a>
<object id="roundcube" data="<%= $url %>" title="<%= $c->stash('title') %>" type="text/html" ><%= $c->stash('title') %> not found</object>
</div>
% }
% my $username = 'admin';
% if ($url =~ /[?&]_user=([^&]+)/) {
% $username = $1;
% }
% if (!($url =~ /https:/)) {
% $url = 'https://' . $url;
% }
<div class='roundcube'>
<a href="<%= "https://" . $thisdomain . "/" %>roundcube?_user=<%= $username %>"><button class="sme-fullwindow1-button" width=20em title="<%= l('Full Window') %>"><%= l('Full Window') %></button></a>
<object id="roundcube" data="<%= $url %>" title="<%= $c->stash('title') %>" type="text/html" ><%= $c->stash('title') %> not found</object>
</div>
</div>
% end
% end

View File

@@ -2,7 +2,7 @@ Summary: Sme Server Configuration : Manager 2
%define name smeserver-manager
Name: %{name}
%define version 11.0.0
%define release 130
%define release 132
Version: %{version}
Release: %{release}%{?dist}
License: GPL
@@ -147,6 +147,12 @@ true
%defattr(-,root,root)
%changelog
* Wed Nov 05 2025 Brian Read <brianr@koozali.org> 11.0.0-132.sme
- Supress webmail option on menu and in user accounts if webmail not enabled [SME: 12997]
* Tue Nov 04 2025 Brian Read <brianr@koozali.org> 11.0.0-131.sme
- Add fix for IE browser local/language detect [SME: 13039]
* Tue Nov 04 2025 Brian Read <brianr@koozali.org> 11.0.0-130.sme
- Adjust heading so that no white line under theme selector and move theme button in [SME: 13057]