Compare commits

...

22 Commits

Author SHA1 Message Date
687e763684 * 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]
2025-09-13 15:53:19 +01:00
74c9beb587 * Mon Aug 11 2025 Brian Read <brianr@koozali.org> 11.0.0-113.sme
- Re-factor all template files to make them nicely formatted  [SME: 13103]
2025-08-12 06:20:31 +01:00
6475521528 * Thu Aug 07 2025 Brian Read <brianr@koozali.org> 11.0.0-112.sme
- Fix sprintf fail in viewlogfiles when % in log line [SME: 13099]
- Fix reboot/shutdown failure - reported by Massimo  - fixed by JC [SME: 13097]
2025-08-07 16:33:12 +01:00
a3fda90a85 * Mon Jul 28 2025 Brian Read <brianr@koozali.org> 11.0.0-111.sme
- Add password strength details to passowrd panels [SME: 13081]
2025-07-28 16:43:41 +01:00
837b855101 * Sat Jul 26 2025 Brian Read <brianr@koozali.org> 11.0.0-110.sme
- Get cifs workstation backup restore to show backup sets [SME: 12645]
  Add lex file for roundcubepanel to provide lex environment for lex strings
2025-07-27 20:24:40 +01:00
237f2f21ab * Wed Jul 16 2025 Brian Read <brianr@koozali.org> 11.0.0-109.sme
- A few more error message corrections [SME: 13078]
2025-07-16 15:46:49 +01:00
1708fbe3fa * Wed Jul 16 2025 Brian Read <brianr@koozali.org> 11.0.0-108.sme
- Password change panel - add extra descriptive text [SME: 13081]
2025-07-16 06:19:47 +01:00
9f6e45d98c * Tue Jul 15 2025 Brian Read <brianr@koozali.org> 11.0.0-107.sme
- Email Settings panel: Fix lex strings with long names and no prefix [SME: 13080]
2025-07-15 15:43:30 +01:00
5ba77e4526 * Mon Jul 14 2025 Brian Read <brianr@koozali.org> 11.0.0-106.sme
- Datetime panel: Typo in error message - missing _ [SME: 13078]
- ditto user accounts panel                         [SME: 13078]
- ditto groups panel                                [SME: 13078]
2025-07-14 11:44:49 +01:00
1d00f2aeb2 * Mon Jul 14 2025 Brian Read <brianr@koozali.org> 11.0.0-105.sme
- Adjust db opening in Software install panel [SME: 13077]
2025-07-14 06:38:10 +01:00
b0c6bea0a2 * Mon Jul 07 2025 Brian Read <brianr@koozali.org> 11.0.0-104.sme
- Fix DB not open in Workgrouyp panel sometimes. [SME: 13070]
2025-07-07 06:22:13 +01:00
5a57ffaa34 * Thu Jul 03 2025 Brian Read <brianr@koozali.org> 11.0.0-103.sme
- Fix a couple of typos [SME: 13065]
2025-07-03 11:11:12 +01:00
717d34a53d * Thu Jul 03 2025 Brian Read <brianr@koozali.org> 11.0.0-102.sme
- Local Network panel: Make DEL and ADD robust even if called more than once by browser [SME: 13065]
2025-07-03 10:18:28 +01:00
bec39af49c * Wed Jul 02 2025 Brian Read <brianr@koozali.org> 11.0.0-101.sme
- Fix busy cursor, csp intervened. [SME: 13064]
2025-07-02 14:10:06 +01:00
ff9c2fee8c * Tue Jul 01 2025 Brian Read <brianr@koozali.org> 11.0.0-100.sme
- Add code in top template default.html.ep to incorporate any panel specific js and css [SME: 13062]
2025-07-01 11:28:58 +01:00
21255abf46 * Mon Jun 30 2025 Brian Read <brianr@koozali.org> 11.0.0-99.sme
- Directory panel  - Add in open for config db as required by cacheing  [SME: 13059]
2025-06-30 20:00:21 +01:00
8ada3f36e0 * Sun Jun 29 2025 Brian Read <brianr@koozali.org> 11.0.0-98.sme
- Re-factor email settings panel as error handling not working as expected.  [SME: 12973]
2025-06-30 14:55:58 +01:00
ab42f986e8 Update changelog - lost it on previous build 2025-06-27 13:59:25 +01:00
803bfd1cec * Fri Jun 27 2025 Brian Read <brianr@koozali.org> 11.0.0-96.sme
- fix [SME: ]
2025-06-27 13:52:21 +01:00
0f2e2b82aa * Tue Jun 24 2025 Brian Read <brianr@koozali.org> 11.0.0-95.sme
- Add clock ticker to datetime panel [SME: 13054]
- Add Test Server button for ntp server [SME: 13048]
- Add checking that date is fully valid [SME: 13055]
2025-06-25 10:35:16 +01:00
0341d02608 * Thu Jun 19 2025 Brian Read <brianr@koozali.org> 11.0.0-94.sme
- re-instate datetime routes in SrvMngr.pm - removed by mistake [SME: 13053]
2025-06-19 10:36:50 +01:00
c208419704 * Thu Jun 19 2025 Brian Read <brianr@koozali.org> 11.0.0-93.sme
- Sort out case of first letter of ctlact in routes added in from header on controller file [SME: 13053]
2025-06-19 06:26:38 +01:00
145 changed files with 7605 additions and 6338 deletions

View File

@@ -37,7 +37,7 @@ use esmith::NavigationDB; # no UTF8 raw is ok for ASCII only flat file
use SrvMngr_Auth qw(check_admin_access);
#this is overwrittrn with the "release" by the spec file - release can be "99.el8.sme"
our $VERSION = '91.el8.sme';
our $VERSION = '94.el8.sme';
#Extract the release value
if ($VERSION =~ /^(\d+)/) {
$VERSION = $1; # $1 contains the matched numeric digits
@@ -325,8 +325,11 @@ sub setup_routing {
$if_admin->get('/clamav')->to('clamav#main')->name('clamav');
$if_admin->post('/clamav')->to('clamav#do_update')->name('clamav2');
#$if_admin->get('/datetime')->to('datetime#main')->name('datetime');
#$if_admin->post('/datetime')->to('datetime#do_update')->name('datetime2');
$if_admin->get('/datetime')->to('datetime#main')->name('datetime');
$if_admin->post('/datetimeu')->to('datetime#do_update')->name('datetimeu');
$if_admin->get('/datetimed')->to('datetime#do_display')->name('datetimed');
$if_admin->post('/datetimet')->to('datetime#do_testntp')->name('datetimet');
$if_admin->get('/directory')->to('directory#main')->name('directory');
$if_admin->post('/directory')->to('directory#do_update')->name('directory2');
@@ -421,28 +424,59 @@ sub setup_routing {
# additional routes (for contribs) got from 'routes' db
#my @routes = @{SrvMngr::get_routes_list()};
foreach (@{SrvMngr::get_routes_list()}) {
if ( defined $_->{method} and defined $_->{url} and defined $_->{ctlact} and defined $_->{name} ) {
my $menu = defined $_->{menu} ? $_->{menu} : 'A';
if ( $menu eq 'N' ) {
$r->get($_->{url})->to($_->{ctlact})->name($_->{name})
if ( $_->{method} eq 'get');
$r->post($_->{url})->to($_->{ctlact})->name($_->{name})
if ( $_->{method} eq 'post');
} elsif ( $menu eq 'U' ) {
$if_logged_in->get($_->{url})->to($_->{ctlact})->name($_->{name})
if ( $_->{method} eq 'get');
$if_logged_in->post($_->{url})->to($_->{ctlact})->name($_->{name})
if ( $_->{method} eq 'post');
} else {
$if_admin->get($_->{url})->to($_->{ctlact})->name($_->{name})
if ( $_->{method} eq 'get');
$if_admin->post($_->{url})->to($_->{ctlact})->name($_->{name})
if ( $_->{method} eq 'post');
}
#foreach (@{SrvMngr::get_routes_list()}) {
#if ( defined $_->{method} and defined $_->{url} and defined $_->{ctlact} and defined $_->{name} ) {
#my $menu = defined $_->{menu} ? $_->{menu} : 'A';
#if ( $menu eq 'N' ) {
#$r->get($_->{url})->to($_->{ctlact})->name($_->{name})
#if ( $_->{method} eq 'get');
#$r->post($_->{url})->to($_->{ctlact})->name($_->{name})
#if ( $_->{method} eq 'post');
#} elsif ( $menu eq 'U' ) {
#$if_logged_in->get($_->{url})->to($_->{ctlact})->name($_->{name})
#if ( $_->{method} eq 'get');
#$if_logged_in->post($_->{url})->to($_->{ctlact})->name($_->{name})
#if ( $_->{method} eq 'post');
#} else {
#$if_admin->get($_->{url})->to($_->{ctlact})->name($_->{name})
#if ( $_->{method} eq 'get');
#$if_admin->post($_->{url})->to($_->{ctlact})->name($_->{name})
#if ( $_->{method} eq 'post');
#}
#}
#}
foreach my $route (@{SrvMngr::get_routes_list()}) {
if (defined $route->{method} && defined $route->{url} && defined $route->{ctlact} && defined $route->{name}) {
my $menu = defined $route->{menu} ? $route->{menu} : 'A';
# Fix controller case: convert "ControllerName" to "controllername" in "ControllerName#action"
# this is so that AdminLTE breadcrumb works - it appears that perl Packages names are NOT case sensitive
# and that the breadcrumb package assumes that the package name is the same as the main route.
my ($controller, $action) = split /#/, $route->{ctlact}, 2;
my $fixed_ctlact = lc($controller) . '#' . $action;
if ($menu eq 'N') {
$r->get($route->{url})->to($fixed_ctlact)->name($route->{name})
if $route->{method} eq 'get';
$r->post($route->{url})->to($fixed_ctlact)->name($route->{name})
if $route->{method} eq 'post';
}
elsif ($menu eq 'U') {
$if_logged_in->get($route->{url})->to($fixed_ctlact)->name($route->{name})
if $route->{method} eq 'get';
$if_logged_in->post($route->{url})->to($fixed_ctlact)->name($route->{name})
if $route->{method} eq 'post';
}
else { # Default: menu 'A'
$if_admin->get($route->{url})->to($fixed_ctlact)->name($route->{name})
if $route->{method} eq 'get';
$if_admin->post($route->{url})->to($fixed_ctlact)->name($route->{name})
if $route->{method} eq 'post';
}
}
}
}
$if_admin->get('/config/:key' => {key => qr/[a-z0-9]{2,32}/})->to('request#getconfig')->name('getconfig');
$if_admin->get('/account/:key' => {key => qr/[a-z0-9]{2,32}/})->to('request#getaccount')->name('getaccount');

View File

@@ -25,6 +25,8 @@ use esmith::AccountsDB::UTF8;
use esmith::util;
use File::Basename;
use File::Find;
# Set to avoid using link counts as it may not work for cifs shares.
$File::Find::dont_use_nlink = 1;
use File::Path qw(make_path remove_tree);
use esmith::Backup;
use esmith::BackupHistoryDB; #no UTF8 and not in use
@@ -1670,7 +1672,7 @@ sub get_Backupset_options () {
my $err;
$mntdir = "/$smbshare" if ($VFSType eq 'usb');
my $setbackuplist = sub {
$c->app->log->info("File presented: $_");
if ($_ =~ /\.dar/) {
my $dir = $File::Find::dir;
my $backupref;
@@ -1696,6 +1698,7 @@ sub get_Backupset_options () {
}
# Finding existing backups
find { wanted => \&$setbackuplist, untaint => 1, untaint_pattern => qr|^([-+@\w\s./]+)$| }, $mntbkdir;
my %blabels = ();
my @list;
@@ -1703,6 +1706,7 @@ sub get_Backupset_options () {
foreach $key (sort keys %backupfiles) {
my $labkey = $mntbkdir . '/' . $backupfiles{$key}[0] . '/' . $backupfiles{$key}[1];
$blabels{$labkey} = $backupfiles{$key}[1] . " (" . $backupfiles{$key}[0] . ")";
$c->app->log->info("Pushing $blabels{$labkey} to $labkey");
push @list, [ "$blabels{$labkey}" => "$labkey" ];
} ## end foreach $key (sort keys %backupfiles)
$error_message .= $c->bunmount($mntdir, $VFSType);
@@ -2129,4 +2133,4 @@ sub vmount {
return (qx(/bin/mount -t nfs -o nolock,timeo=30,retrans=1,retry=0 "$host:/$share" $mountdir 2>&1));
}
} ## end sub vmount
1;
1;

View File

@@ -13,6 +13,8 @@ use esmith::NetworksDB::UTF8;
use esmith::HostsDB;
use esmith::DomainsDB::UTF8;
use DateTime;
use constant FALSE => 0;
use constant TRUE => 1;
@@ -79,6 +81,7 @@ my $ddb;
my $now_sec = sprintf('%02d', $today_sec);
my $current_year = $today_year;
my $ntpserverurl = $cdb->get_prop('ntpd','NTPServer');
my $now = DateTime->now( time_zone => 'local' );
my %ret = (
# fields from Inputs
'time_mode'=>($ntpserverurl eq '' ? 'dat_manually_set' : 'dat_ntp_server'),
@@ -90,6 +93,8 @@ my $ddb;
'minute'=>"$now_min",
'second'=>"$now_sec",
'ntpstatus' => $cdb->get_prop('ntpd','status') || 'disabled',
# and the current time as a full format
'currentdatetime' => $now->strftime('%Y-%m-%dT%H:%M:%S')
);
return %ret;
@@ -224,38 +229,12 @@ sub validate_change_datetime {
$timezone = "US/Eastern";
}
my $month = $c->param('month');
if ($month =~ /^(\d{1,2})$/) {
$month = $1;
} else {
$month = "1";
}
if (($month < 1) || ($month > 12)) {
return $c->l('dat_INVALID_MONTH') . " $month. " . $c->l('dat_MONTH_BETWEEN_1_AND_12');
}
my $day = $c->param('day');
if ($day =~ /^(\d{1,2})$/) {
$day = $1;
} else {
$day = "1";
}
if (($day < 1) || ($day > 31)) {
return $c->l('dat_INVALID_DAY') . " $day. " . $c->l('dat_BETWEEN_1_AND_31');
}
my $year = $c->param('year');
if (!is_valid_date($year, $month, $day)){
return $c->l('dat_Invalid_date')
}
if ($year =~ /^(\d{4})$/) {
$year = $1;
} else {
$year = "2000";
}
if (($year < 1900) || ($year > 2200)) {
return $c->l('dat_INVALID_YEAR') . " $year. " . $c->l('dat_FOUR_DIGIT_YEAR');
}
my $hour = $c->param('hour');
if ($hour =~ /^(\d{1,2})$/) {
@@ -276,7 +255,7 @@ sub validate_change_datetime {
}
if (($minute < 0) || ($minute > 59)) {
return $c->l('datINVALID_MINUTE') . " $minute. " . $c->l('dat_BETWEEN_0_AND_59');
return $c->l('dat_INVALID_MINUTE') . " $minute. " . $c->l('dat_BETWEEN_0_AND_59');
}
my $second = $c->param('second');
@@ -289,24 +268,6 @@ sub validate_change_datetime {
if (($second < 0) || ($second > 59)) {
return $c->l('dat_INVALID_SECOND') . " $second. " . $c->l('dat_BETWEEN_0_AND_59');
}
#my $ampm = $c->param('Ampm');
#Move to 24 hours clock - not using AM/PM.
#if ($ampm =~ /^(AM|PM)$/) {
#$ampm = $1;
#} else {
#$ampm = "AM";
#}
# force AM so that it actually works on 24hr clock.
#$ampm = "AM";
# convert to 24 hour time
#$hour = $hour % 12;
#if ($ampm eq "PM") {
# $hour = $hour + 12;
#}
#--------------------------------------------------
# Store time zone in configuration database
@@ -325,10 +286,27 @@ sub validate_change_datetime {
# and hardware clock
#--------------------------------------------------
my $newdate = sprintf "%02d%02d%02d%02d%04d.%02d", $month, $day, $hour, $minute, $year, $second;
esmith::util::backgroundCommand(2, "/sbin/e-smith/signal-event", "timezone-update", $newdate);
$c->app->log->info("Changing date manually to $newdate");
esmith::util::backgroundCommand(2, "/sbin/e-smith/signal-event", "timezone-update", $newdate); #TEMP!!!
return '';
} ## end sub validate_change_datetime
sub is_valid_date {
my ($year, $month, $day) = @_;
# Check if all parts are defined and integers
return 0 unless defined $year && defined $month && defined $day;
return 0 unless $year =~ /^\d+$/ && $month =~ /^\d+$/ && $day =~ /^\d+$/;
# Try to construct a DateTime object
eval {
DateTime->new(year => $year, month => $month, day => $day);
1;
} or return 0;
return 1;
}
sub update_ntpserver {
my $c = shift;
my $ntpserver = shift;
@@ -378,6 +356,4 @@ sub disable_ntp {
return '';
} ## end sub disable_ntp
1;

View File

@@ -8,6 +8,9 @@ package SrvMngr::Controller::Datetime;
# heading : System
# description : Date and time
# navigation : 4000 300
#
# ######name : datetimet, method : post, url : /datetimet, ctlact : datetime#testntp
#
# routes : end
#
# Documentation: https://wiki.contribs.org/Datetime
@@ -115,7 +118,7 @@ sub do_update {
my $c = shift;
$c->app->log->info($c->log_req);
$c->app->log->info($c->param('month'));
#$c->app->log->info($c->param('month'));
#The most common ones - you might want to delete some of these if they are not used.
@@ -173,7 +176,7 @@ sub do_update {
$c->render(template => "datetime");
return
} else {
if ($c->param('time_mode') eq 'data_manually_set') {
if ($c->param('time_mode') eq 'dat_manually_set') {
$c->stash( success => $c->l('dat_UPDATING_CLOCK'));
} else {
$c->stash( success => $c->l('dat_SETTINGS_CHANGED'));
@@ -279,5 +282,52 @@ sub do_display {
dat_data => \%dat_data
);
$c->render(template => "datetime");
}
}
sub do_testntp {
my $c = shift;
my $server = $c->req->json->{ntpserver} // '';
# Strict validation: hostname or IPv4
unless ($server =~ /^(?=.{1,253}$)([a-zA-Z0-9](?:[a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?)*|\d{1,3}(?:\.\d{1,3}){3})$/) {
return $c->render(json => { success => 0, error => 'Invalid server name or IP' });
}
my $timeout = 5;
my @cmd = ('timeout', $timeout, 'ntpdate', '-q', $server);
# Run ntpdate and capture output
my $output = qx{@cmd 2>&1};
$c->app->log->info($output);
my $exit_code = $? >> 8;
# Parse for known errors
if ($exit_code == 124) {
return $c->render(json => { success => 0, error => "Timeout: NTP server did not respond within $timeout seconds" });
}
if ($output =~ /no server suitable for synchronization found/i) {
return $c->render(json => { success => 0, error => "No suitable NTP server found or server unreachable" });
}
if ($output =~ /Name or service not known|Temporary failure in name resolution/i) {
return $c->render(json => { success => 0, error => "DNS resolution failed for $server" });
}
if ($output =~ /ntpdig: no eligible servers/i) {
return $c->render(json => { success => 0, error => "Not a an NTP server" });
}
if ($output =~ /permission denied/i) {
return $c->render(json => { success => 0, error => "Permission denied running ntpdate" });
}
if ($exit_code != 0) {
return $c->render(json => { success => 0, error => "ntpdate failed (exit code $exit_code): $output" });
}
# Extract date and time down to seconds from adjust line
my ($datetime) = $output =~ /^(\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2})/m;
if ($datetime) {
return $c->render(json => { success => 1, time => $datetime });
} else {
return $c->render(json => { success => 0, error => "Could not parse date/time from NTP server response." });}
}
1;

View File

@@ -39,6 +39,7 @@ sub main {
sub do_update {
my $c = shift;
$c->app->log->info($c->log_req);
$db = esmith::ConfigDB::UTF8->open() || die "Couldn't open config db";
my $access = $c->param('access');
my $department = $c->param('department');
my $company = $c->param('company');
@@ -84,7 +85,7 @@ sub get_ldap_base {
sub get_value {
my $fm = shift;
my $item = shift;
$db = esmith::ConfigDB::UTF8->open() || die "Couldn't open config db";
my $record = $db->get($item);
if ($record) {
return $record->value();
@@ -93,4 +94,4 @@ sub get_value {
return '';
}
}
1;
1;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -132,7 +132,7 @@ sub do_update {
# Untaint groupName before use in system()
($groupName) = ($groupName =~ /^([a-z][\-\_\.a-z0-9]*)$/);
system("/sbin/e-smith/signal-event", "group-create", "$groupName") == 0
or $result .= $c->l('qgp_CREATE_ERROR') . "\n";
or $result .= $c->l('grp_CREATE_ERROR') . "\n";
} ## end if (!$result)
if (!$result) {
@@ -161,7 +161,7 @@ sub do_update {
# Untaint groupName before use in system()
($groupName) = ($groupName =~ /^([a-z][\-\_\.a-z0-9]*)$/);
system("/sbin/e-smith/signal-event", "group-modify", "$groupName") == 0
or $result .= $c->l('qgp_MODIFY_ERROR') . "\n";
or $result .= $c->l('grp_MODIFY_ERROR') . "\n";
} ## end if (!$result)
if (!$result) {
@@ -414,4 +414,4 @@ sub validate_description {
return ($c->l('FM_ERR_UNEXPECTED_DESC'));
}
} ## end sub validate_description
1
1

View File

@@ -5,6 +5,12 @@ package SrvMngr::Controller::Localnetworks;
# description : Local networks
# navigation : 6000 500
#
#$if_admin->get('/localnetworks')->to('localnetworks#main')->name('localnetworks');
#$if_admin->post('/localnetworks')->to('localnetworks#do_display')->name('localnetworks');
#$if_admin->post('/localnetworksa')->to('localnetworks#do_display')->name('localnetworksadd');
#$if_admin->post('/localnetworksb')->to('localnetworks#do_display')->name('localnetworksadd1');
#$if_admin->get('/localnetworksd')->to('localnetworks#do_display')->name('localnetworksdel');
#$if_admin->post('/localnetworkse')->to('localnetworks#do_display')->name('localnetworksdel1');
# routes : end
#----------------------------------------------------------------------
use strict;
@@ -53,6 +59,7 @@ sub do_display {
$trt = 'ADD' if ($rt eq 'localnetworksadd');
$trt = 'ADD1' if ($rt eq 'localnetworksadd1');
$trt = 'DEL1' if ($rt eq 'localnetworksdel1');
$c->app->log->info("Localnetworks:trt:$trt");
my %ln_datas = ();
my $title = $c->l('ln_LOCAL NETWORKS');
my $modul = '';
@@ -83,16 +90,21 @@ sub do_display {
if ($trt eq 'DEL1') {
#After Remove clicked on Delete network panel
#$network_db = esmith::NetworksDB::UTF8->open() || die("Failed to open Networkdb-1");
#$network_db = esmith::NetworksDB::UTF8->open() || die("Failed to open Networkdb-1");
my $localnetwork = $c->param("localnetwork");
my $delete_hosts = $c->param("deletehost") || "1"; #default to deleting them.
my $rec = $network_db->get($localnetwork) || die("Failed to find network on db:$localnetwork");
if ($rec and $rec->prop('type') eq 'localnetwork') {
$ln_datas{localnetwork} = $localnetwork;
}
my %ret = remove_network($localnetwork, $delete_hosts);
#$network_db = esmith::NetworksDB::UTF8->open() || die("Failed to open Networkdb-2"); #Refresh the network DB
my $delete_hosts = $c->param("deletehost") || "1"; #default to deleting them.
$c->app->log->info("Localnetworks:deleting $localnetwork");
my ($rec,%ret);
if ($rec = $network_db->get($localnetwork)){ #|| die("Failed to find network on db:$localnetwork");
if ($rec and $rec->prop('type') eq 'localnetwork') {
$ln_datas{localnetwork} = $localnetwork;
}
%ret = $c->remove_network($localnetwork, $delete_hosts);
} else {
$c->app->log->info("Local network: delete failed to find network in db: $localnetwork");
%ret = (ret => "");
}
#$network_db = esmith::NetworksDB::UTF8->open() || die("Failed to open Networkdb-2"); #Refresh the network DB
my @localnetworks;
if ($network_db) {
@@ -100,8 +112,10 @@ sub do_display {
}
# Load up ln_datas with values need by template
$ln_datas{subnet} = $rec->prop('Mask');
$ln_datas{router} = $rec->prop('Router');
if ($rec){
$ln_datas{subnet} = $rec->prop('Mask');
$ln_datas{router} = $rec->prop('Router');
}
$c->stash(ln_datas => \%ln_datas, localnetworks => \@localnetworks, ret => \%ret);
} ## end if ($trt eq 'DEL1')
@@ -109,14 +123,20 @@ sub do_display {
#Initial delete panel requiring confirmation
my $localnetwork = $c->param("localnetwork") || '';
my ($rec,%ret);
$c->stash(localnetwork => $localnetwork);
my $rec = $network_db->get($localnetwork) || die("Failed to get local network in db::$localnetwork");
my $subnet = $rec->prop('Mask');
$ln_datas{subnet} = $subnet;
$ln_datas{router} = $rec->prop('Router');
my $numhosts = hosts_on_network($localnetwork, $subnet);
$ln_datas{localnetwork} = $localnetwork;
$ln_datas{deletehosts} = $numhosts > 0 ? 1 : 0;
if ($rec = $network_db->get($localnetwork)){
my $subnet = $rec->prop('Mask');
$ln_datas{subnet} = $subnet;
$ln_datas{router} = $rec->prop('Router');
my $numhosts =$c->hosts_on_network($localnetwork, $subnet);
$ln_datas{localnetwork} = $localnetwork;
$ln_datas{deletehosts} = $numhosts > 0 ? 1 : 0;
} else {
$c->app->log->info("Local network:Initial Failed to find network in Db: $localnetwork");
$c->flash('error',$c->l('ln_Failed to find network in Db'));
$trt = 'LIST';
}
} ## end if ($trt eq 'DEL')
if ($trt eq 'LIST') {
@@ -136,6 +156,7 @@ sub do_display {
} ## end sub do_display
sub remove_network {
my $c = shift;
my $network = shift;
$network_db = esmith::NetworksDB::UTF8->open();
my $record = $network_db->get($network);
@@ -152,7 +173,7 @@ sub remove_network {
if (system("/sbin/e-smith/signal-event", "network-delete", $network) == 0) {
if ($delete_hosts) {
my @hosts_to_delete = hosts_on_network($network, $subnet);
my @hosts_to_delete = $c->hosts_on_network($network, $subnet);
foreach my $host (@hosts_to_delete) {
$host->delete;
@@ -169,6 +190,7 @@ sub remove_network {
} ## end sub remove_network
sub hosts_on_network {
my $c = shift;
my $network = shift;
my $netmask = shift;
die if not $network and $netmask;
@@ -191,17 +213,20 @@ sub hosts_on_network {
} ## end sub hosts_on_network
sub add_network {
my ($fm) = @_;
my $networkAddress = $fm->param('networkAddress');
my $networkMask = $fm->param('networkMask');
my $networkRouter = $fm->param('networkRouter');
my ($c) = @_;
my $networkAddress = $c->param('networkAddress');
my $networkMask = $c->param('networkMask');
my $networkRouter = $c->param('networkRouter');
#Start by checking that the network does not already exist
#Validate Ips and subnet mask
my $res = ip_number($fm, $networkAddress);
my $res = ip_number($c, $networkAddress);
return (ret => 'ln_INVALID_IP_ADDRESS', vars => "Network Address $res") unless $res eq 'OK';
$res = subnet_mask($networkMask);
return (ret => 'ln_INVALID_SUBNET_MASK', vars => "$networkMask") unless $res eq 'OK';
$res = ip_number($fm, $networkRouter);
$res = ip_number($c, $networkRouter);
return (ret => 'ln_INVALID_IP_ADDRESS', vars => "Routeur Address $res") unless $res eq 'OK';
# we transform bit mask to regular mask
@@ -234,19 +259,25 @@ sub add_network {
if ($network_db->get($network)) {
return (ret => 'ln_NETWORK_ALREADY_ADDED', vars => "$network,$networkMask,$networkRouter");
}
$network_db->new_record(
$res = $network_db->new_record(
$network,
{ Mask => $networkMask,
Router => $networkRouter,
type => 'network',
}
);
# Untaint $network before use in system()
$network =~ /(.+)/;
$network = $1;
system("/sbin/e-smith/signal-event", "network-create", $network) == 0
or (return (ret => 'ln_ERROR_CREATING_NETWORK', vars => "$network,$networkMask,$networkRouter"));
if (! $res) {
#Record already existed
$c->app->log->info("Local Network:Network already exists:$network");
#return success message
} else {
#Only call underlying batch if new record created
# Untaint $network before use in system()
$network =~ /(.+)/;
$network = $1;
system("/sbin/e-smith/signal-event", "network-create", $network) == 0
or (return (ret => 'ln_ERROR_CREATING_NETWORK', vars => "$network,$networkMask,$networkRouter"));
}
my ($totalHosts, $firstAddr, $lastAddr) = esmith::util::computeHostRange($network, $networkMask);
my $msg;

View File

@@ -120,6 +120,20 @@ sub do_display {
}
$c->stash(useraccounts => \@useraccounts);
} ## end if ($trt eq 'LIST')
my $cdb = esmith::ConfigDB::UTF8->open_ro || die "Couldn't open configuration db";
my $rec = $cdb->get('passwordstrength');
$usr_datas{passwdlength} = ($rec ? ($rec->prop('length') || 12) : 12);
if ($trt eq 'PWS'){
$usr_datas{passwdstrength} = ($rec ? ($rec->prop('Admin') || 'none') : 'none');
} else {
$usr_datas{passwdstrength} = ($rec ? ($rec->prop('Users') || 'none') : 'none');
}
if ( !(defined $usr_datas{passwdstrength} && $usr_datas{passwdstrength} =~ /^(none|normal|intermediate|strong)$/)) {
$usr_datas{passwdstrength} = 'strong';
}
$c->stash(title => $title, notif => $notif, usr_datas => \%usr_datas);
$c->render(template => 'useraccounts');
} ## end sub do_display
@@ -176,7 +190,7 @@ sub do_update {
$result .= $res unless $res eq 'OK';
if (!$result) {
$result = $c->l('usrUSER_CREATED') . ' ' . $user;
$result = $c->l('usr_USER_CREATED') . ' ' . $user;
$usr_datas{trt} = 'SUC';
}
} ## end if (!$result)
@@ -361,7 +375,7 @@ sub lock_account {
$adb = esmith::AccountsDB::UTF8->open();
return 'OK';
} else {
return $c->l('NO_SUCH_USER', $user);
return $c->l('usr_NO_SUCH_USER', $user);
}
} ## end sub lock_account
@@ -380,13 +394,13 @@ sub remove_account {
if (system("/sbin/e-smith/signal-event", "user-delete", $user)) {
$adb = esmith::AccountsDB::UTF8->open();
return $c->l("ERR_OCCURRED_DELETING");
return $c->l("usr_ERR_OCCURRED_DELETING");
}
$adb = esmith::AccountsDB::UTF8->open();
$adb->get($user)->delete;
return 'OK';
} else {
return $c->l('NO_SUCH_USER', $user);
return $c->l('usr_NO_SUCH_USER', $user);
}
} ## end sub remove_account
@@ -413,7 +427,7 @@ sub reset_password {
$adb = esmith::AccountsDB::UTF8->open();
return 'OK';
} else {
return $c->l('NO_SUCH_USER', $user);
return $c->l('usr_NO_SUCH_USER', $user);
}
} ## end sub reset_password
@@ -788,7 +802,7 @@ sub system_change_password {
if ($result == 0) {
return 'OK';
} else {
return $c->l("Error occurred while modifying password for admin.", 'First');
return $c->l("Error occurred while modifying password for admin.");
}
} ## end sub system_change_password
1
1

View File

@@ -21,6 +21,7 @@ use SrvMngr qw( theme_list init_session validate_password );
sub main {
my $c = shift;
my %pwd_datas = ();
my $title = $c->l("pwd_ACCOUNT_PASSWORD_CHANGE");
if ($c->is_logged_in) {
$pwd_datas{Account} = $c->session->{username};
@@ -34,7 +35,7 @@ sub main {
# request already treated or outdated
if ($c->pwdrst->{$name}{confirmed} != 1 or $c->pwdrst->{$name}{date} < time()) {
$mess = $c->l('use_INVALID_REQUEST') . ' -step 1-';
$mess = $c->l('pwd_INVALID_REQUEST') . ' -step 1-';
}
if ($mess) {
@@ -47,8 +48,20 @@ sub main {
$pwd_datas{Account} = $name;
$pwd_datas{trt} = 'RESET';
$pwd_datas{jwt} = $jwt;
$c->flash(success => $c->l('use_OK_FOR_RESET'));
$c->flash(success => $c->l('pwd_OK_FOR_RESET'));
} ## end else [ if ($c->is_logged_in) ]
my $cdb = esmith::ConfigDB::UTF8->open_ro || die "Couldn't open configuration db";
my $rec = $cdb->get('passwordstrength');
$pwd_datas{passwdlength} = ($rec ? ($rec->prop('length') || 12) : 12);
if ($c->is_admin){
$pwd_datas{passwdstrength} = ($rec ? ($rec->prop('Admin') || 'none') : 'none');
} else {
$pwd_datas{passwdstrength} = ($rec ? ($rec->prop('Users') || 'none') : 'none');
}
if ( !(defined $pwd_datas{passwdstrength} && $pwd_datas{passwdstrength} =~ /^(none|normal|intermediate|strong)$/)) {
$pwd_datas{passwdstrength} = 'strong';
}
$c->stash(pwd_datas => \%pwd_datas);
$c->render('userpassword');
} ## end sub main
@@ -74,7 +87,7 @@ sub change_password {
# request already treated or outdated
if ($c->pwdrst->{$name}{confirmed} != 2 or $c->pwdrst->{$name}{date} < time()) {
$mess = $c->l('use_INVALID_REQUEST') . ' -step 2-';
$mess = $c->l('pwd_INVALID_REQUEST') . ' -step 2-';
}
if (!$name or $c->is_logged_in or $name ne $acctName) {
@@ -158,7 +171,7 @@ sub change_password {
sub reset_password {
my ($c, $trt, $user, $password, $oldpassword) = @_;
my $ret;
return $c->l('usr_TAINTED_USER') unless (($user) = ($user =~ /^(\w[\-\w_\.]*)$/));
return $c->l('pwd_TAINTED_USER') unless (($user) = ($user =~ /^(\w[\-\w_\.]*)$/));
$user = $1;
my $adb = esmith::AccountsDB::UTF8->open();
my $acct = $adb->get($user);
@@ -171,7 +184,7 @@ sub reset_password {
if (system("/sbin/e-smith/signal-event", "password-modify", $user)) {
$adb = esmith::AccountsDB::UTF8->open();
return $c->l("usr_ERR_OCCURRED_MODIFYING_PASSWORD");
return $c->l("pwd_ERR_OCCURRED_MODIFYING_PASSWORD");
}
$adb = esmith::AccountsDB::UTF8->open();
return 'OK';
@@ -199,4 +212,4 @@ sub check_password {
return validate_password($c, $strength, $password);
} ## end sub check_password
1;
1;

View File

@@ -211,8 +211,8 @@ sub showlogFile {
$_ = timestamp2local($_);
$_ = HTML::Entities::encode_entities($_);
($log_datas{highlightpattern} && /$log_datas{highlightpattern}/)
? $out .= sprintf("<b>$_</b>")
: $out .= sprintf("$_");
? $out .= "<b>$_</b>"
: $out .= "$_";
} ## end while (<LOGFILE>)
$out .= sprintf("</PRE>");
@@ -297,4 +297,4 @@ sub download_logFile {
);
return undef;
} ## end sub download_logFile
1;
1;

View File

@@ -34,6 +34,7 @@ sub main {
sub do_update {
my $c = shift;
$c->app->log->info($c->log_req);
$db = esmith::ConfigDB::UTF8->open || die "Couldn't open config db";
my $result = "";
my $workgroup = ($c->param('Workgroup') || 'no');
my $servername = ($c->param('ServerName') || 'WS');
@@ -78,4 +79,4 @@ sub validate2_workgroup {
return $c->l('INVALID_WORKGROUP_MATCHES_SERVERNAME') if ($servername eq $workgroup);
return ('OK');
} ## end sub validate2_workgroup
1;
1;

View File

@@ -4,6 +4,12 @@ package SrvMngr::Controller::Yum;
# heading : System
# description : Software installer
# navigation : 4000 500
#$if_admin->get('/yum')->to('yum#main')->name('yum');
#$if_admin->post('/yum')->to('yum#do_display')->name('yumd1');
#$if_admin->get('/yumd')->to('yum#do_display')->name('yumd');
#$if_admin->post('/yumd')->to('yum#do_update')->name('yumu');
#
# routes : end
#----------------------------------------------------------------------
@@ -23,20 +29,20 @@ my $dnf_status_file = '/var/cache/dnf/dnf.status';
#use File::stat;
our %dbs;
for (qw(available installed updates)) {
$dbs{$_} = esmith::ConfigDB::UTF8->open_ro("dnf_$_")
or die "Couldn't open dnf_$_ DB\n";
}
for (qw(repositories)) {
$dbs{$_} = esmith::ConfigDB::UTF8->open("yum_$_")
or die "Couldn't open yum_$_ DB\n";
}
sub main {
my $c = shift;
$c->app->log->info($c->log_req);
$cdb = esmith::ConfigDB::UTF8->open || die "Couldn't open config db";
for (qw(available installed updates)) {
$dbs{$_} = esmith::ConfigDB::UTF8->open_ro("dnf_$_")
or die "Couldn't open dnf_$_ DB\n";
}
for (qw(repositories)) {
$dbs{$_} = esmith::ConfigDB::UTF8->open("yum_$_")
or die "Couldn't open yum_$_ DB\n";
}
my %yum_datas = ();
my $title = $c->l('yum_FORM_TITLE');
my $dest = 'yum';
@@ -63,6 +69,15 @@ sub do_display {
my $rt = $c->current_route;
my $trt = ($c->param('trt') || 'STAT');
$cdb = esmith::ConfigDB::UTF8->open || die "Couldn't open config db";
for (qw(available installed updates)) {
$dbs{$_} = esmith::ConfigDB::UTF8->open_ro("dnf_$_")
or die "Couldn't open dnf_$_ DB\n";
}
for (qw(repositories)) {
$dbs{$_} = esmith::ConfigDB::UTF8->open("yum_$_")
or die "Couldn't open yum_$_ DB\n";
}
my %yum_datas = ();
my $title = $c->l('yum_FORM_TITLE');
my ($notif, $dest) = '';
@@ -113,6 +128,16 @@ sub do_update {
$c->app->log->info($c->log_req);
my $rt = $c->current_route;
my $trt = $c->param('trt');
$cdb = esmith::ConfigDB::UTF8->open || die "Couldn't open config db";
for (qw(available installed updates)) {
$dbs{$_} = esmith::ConfigDB::UTF8->open_ro("dnf_$_")
or die "Couldn't open dnf_$_ DB\n";
}
for (qw(repositories)) {
$dbs{$_} = esmith::ConfigDB::UTF8->open("yum_$_")
or die "Couldn't open yum_$_ DB\n";
}
my %yum_datas = ();
$yum_datas{trt} = $trt;
my $title = $c->l('yum_FORM_TITLE');
@@ -456,4 +481,4 @@ sub show_yum_log {
my $yum_log = $cdb->get_prop_and_delete('dnf', 'LogFile');
return $out;
} ## end sub show_yum_log
1;
1;

View File

@@ -1,5 +1,5 @@
'dat_FORM_TITLE' => 'Date and time configuration',
'dat_The_time_is_currently' => 'The time is currently:',
'dat_INITIAL_DESC' => 'This is where you configure the date and time of this server. You may use an existing network time server or
manually set the date and time for your time zone.',
'dat_SET_DATE_TITLE' => 'Set Date and Time',
@@ -58,4 +58,5 @@ clock, and <b>will not</b> try to synchronize from a time server.',
'dat_ntp_server' => 'NTP server',
'dat_manually_set' => 'Set manually',
'dat_NTP_Server_URL' =>'NTP Server URL:',
'dat_set_manually' =>'Set Date and Time:',
'dat_set_manually' =>'Set Date and Time:',
'dat_Invalid_date' => 'Invalid date',

View File

@@ -1,6 +1,5 @@
'mai_FORM_TITLE' => 'E-mail settings',
'E-mail' => 'E-mail',
'mai_E-Mail' => 'E-mail',
'mai_SUCCESS' => 'The new e-mail settings have been saved.',
'mai_NEVER' => 'not at all',
'mai_EVERY5MIN' => 'Every 5 minutes',
@@ -20,7 +19,7 @@ for dialup connections), or multi-drop (for dialup connections if
ETRN is not supported by your Internet provider). Note that
multi-drop mode is the only option available when the server is
configured in private server and gateway mode.',
'mai_LABEL_DELEGATE' => 'Address of internal mail server',
'mai_LABEL_DELEGATE' => 'IP Address of internal mail server',
'mai_TITLE_DELEGATE' => 'Delegate mail servers',
'mai_DESC_DELEGATE' => 'Your server includes a complete, full-featured e-mail server. However,
if for some reason you wish to delegate e-mail processing to
@@ -79,10 +78,9 @@ destination (recommended in most cases) or can deliver them via
your Internet provider\'s SMTP server (recommended if you have an
unreliable Internet connection or are using a residential Internet
service). If using your Internet provider\'s SMTP server, specify
its hostname or IP address below. Otherwise leave this field
blank.',
'mai_INVALID_SMARTHOST' => 'The smarthost name you entered is not a valid internet domain name
and is not blank',
its hostname or IP address below. Otherwise leave this field blank.',
'mai_INVALID_SMARTHOST' => 'The smarthost name you entered is not a valid internet domain name and is not blank',
'mai_INVALID_DELEGATE' => 'The delegate host name you entered is not a valid IP Address and is not blank',
'mai_DESC_POP_ACCESS_CONTROL' => 'You can control POP3 server access. The setting \'Allow access
only from local networks\' allows POP3 access only from your
local network(s). The POP3S setting can be used to provide
@@ -150,5 +148,16 @@ The value for this tag can be defined below.',
'mai_LABEL_SMARTHOST_SMTPAUTH_STATUS' => 'SMTP Authentication for Internet provider',
'mai_LABEL_SMARTHOST_SMTPAUTH_USERID' => 'Mail server user id',
'mai_LABEL_SMARTHOST_SMTPAUTH_PASSWD' => 'Mail server password',
'mai_VALIDATION_SMTPAUTH_NONBLANK' => 'This field cannot be left blank if SMTP Authentication is
'mai_VALIDATION_SMTPAUTH_NONBLANK' => 'The user id and password fields cannot be left blank if SMTP Authentication is
enabled.',
'mai_ACC_panel_action_was_successful' => 'Email access settings saved sucessfully',
'mai_DEL_panel_action_was_successful' => 'Email delivery settings saved sucessfully',
'mai_FIL_panel_action_was_successful' => 'Email filtering settings saved sucessfully',
'mai_REC_panel_action_was_successful' => 'Email receive settings saved sucessfully',
'mai_SMTP_port_authenticate' => 'Smtp port %u allow client to authenticate:',
'mai_SMTP_port_(25)' => 'Smtp port (25) main purpose is to receive emails from another server, starttls is always offered, but auth if offered is only if starttls is also used by client.',
'mai_SMTP_Submission' => 'Smtp submission port (587) will require starttls, then authenticate to send.',
'mai_SMTPS_port_(465)' => 'Smtps port (465) will require implicit ssl/tls then authenticate to send.',
'mai_SMTPS_SSL/TLS' => 'Smtps ssl/tls auth: port %u status:',
'mai_Submission_port' => 'Submission port %u status:'

View File

@@ -27,4 +27,5 @@
'ln_REMOVE_HOSTS_DESC' => 'Local hosts configured on the network you are about to remove have been detected. By default, they will also be removed. Uncheck this box if, for some reason, you do not wish this to happen. Note that they will not be treated as local, and may not even be reachable, after this network is removed. ',
'ln_REMOVE_HOSTS_LABEL' => 'Remove hosts on network',
'ln_extra' => '[_1]/[_2] via router $networkRouter}.',
'ln_SUCCESS_NONSTANDARD_RANGE' =>'<p>Successfully added network [_1]/[_2] via router [_3].</p><p> Your server will grant local access privileges to [_4] IP addresses in the range [_5] to [_6].</p><p> Warning: the ProFTPd FTP server cannot handle this nonstandard subnet mask. The simpler specification <b>[_7]</b> will be used instead.</p>',
'ln_SUCCESS_NONSTANDARD_RANGE' =>'<p>Successfully added network [_1]/[_2] via router [_3].</p><p> Your server will grant local access privileges to [_4] IP addresses in the range [_5] to [_6].</p><p> Warning: the ProFTPd FTP server cannot handle this nonstandard subnet mask. The simpler specification <b>[_7]</b> will be used instead.</p>',
'ln_Failed to find network in Db' => 'Failed to find network in Db',

View File

@@ -60,3 +60,8 @@
'usr_NEW_SYSTEM_PASSWORD_VERIFY' => 'New system password (verify)',
'usr_LABEL_IPSECRW_DOWNLOAD' => 'Download digital certificate to IPSec client',
'usr_ERR_OCCURRED_DELETING' => 'An error occurred while trying to delete the user.',
'usr_NONE_PASSWORD_DESCRIPTION' => 'The password must be composed of at least [_1] characters.',
'usr_NORMAL_PASSWORD_DESCRIPTION' => 'The password must be composed of at least [_1] characters with uppercase and lowercase letters.',
'usr_INTERMEDIATE_PASSWORD_DESCRIPTION' => 'The password must be composed of at least [_1] characters with uppercase and lowercase letters and must pass a dictionary check.',
'usr_STRONG_PASSWORD_DESCRIPTION' => 'The password must be composed of at least [_1] characters with uppercase and lowercase letters, numbers and special characters and must pass a dictionary check.',
'usr_PASSWORD_WIKI' => "If you want to know more about passwords, then please refer to the <a href='https://wiki.koozali.org/SME_Server:Documentation:Administration_Manual:Chapter9#Changing_User_Passwords'>Wiki</a>",

View File

@@ -19,3 +19,8 @@
'pwd_PASSWORD_CHANGE_SUCCESS' => 'Your password has been successfully changed.',
'pwd_DESCRIPTION' => '<P>To change your account password, please fill out the following form. You will need to provide the name of your account, your old password, and your desired new password. (You must type the new password twice.)</P><P>If you cannot change your password because you have forgotten the old one, your local system administrator can reset your password using the <EM>server manager</EM>.</P>',
'pwd_DESCRIPTION_RESET' => '<P>To reset your account password, please fill out the following form. You will need to provide your desired new password. (You must type it twice.)</P><P>In cas of problem, your local system administrator can reset your password using the <EM>server manager</EM>.</P>',
'pwd_NONE_PASSWORD_DESCRIPTION' => 'The password must be composed of at least [_1] characters.',
'pwd_NORMAL_PASSWORD_DESCRIPTION' => 'The password must be composed of at least [_1] characters with uppercase and lowercase letters.',
'pwd_INTERMEDIATE_PASSWORD_DESCRIPTION' => 'The password must be composed of at least [_1] characters with uppercase and lowercase letters and must pass a dictionary check.',
'pwd_STRONG_PASSWORD_DESCRIPTION' => 'The password must be composed of at least [_1] characters with uppercase and lowercase letters, numbers and special characters and must pass a dictionary check.',
'pwd_PASSWORD_WIKI' => "If you want to know more about passwords, then please refer to the <a href='https://wiki.koozali.org/SME_Server:Documentation:Administration_Manual:Chapter9#Changing_User_Passwords'>Wiki</a>",

View File

@@ -7,7 +7,7 @@
.datetime-label-col {
background: #e8f3e2; /* light green */
padding: 1em 0em 0em 0em;
min-width: 192px;
min-width: 30%;
display: flex;
align-items: flex-start;
justify-content: flex-end;
@@ -16,7 +16,7 @@
}
.datetime-label {
display: block;
display:inline-flex;
}
.datetime-fields-col {
@@ -26,4 +26,26 @@
border: 1px solid #ccc;
border-left: none;
border-radius: 0 4px 4px 0;
}
}
.datetime-clock {
min-width: 20em;
display:inline-flex;
border:0px;
padding:5px;
}
.datetime-clock-label {
background-color:#e8f3e2;
display:inline-flex;
width:30%;
font-weight:bold;
text-align:right;
}
.ntp-test-result { font-weight: bold; }
.ntp-test-success { color: green; }
.ntp-test-error { color: red; }
.ntp-test-wait { color: #333; }

View File

@@ -0,0 +1,14 @@
/*
Generated by: SM2Gen version:0.9(20Jan2025) Chameleon version:4.5.4 On Python:3.12.3 at 2025-06-29 08:53:20
*/
.Emailsettings-panel {}
.name {}
.rout {}
.name {}
.rout {}
.name {}
.rout {}
.name {}
.rout {}
.name {}
.rout {}

View File

@@ -280,4 +280,14 @@ background-color: #e8f3e1;
/* Or specify the desired color */
text-decoration: none;
/* Or any other style you want to reset */
}
#busy-indicator {
display: none;
margin-top: 10px;
font-weight: bold;
color: red;
}
.busy {
cursor: wait; /* Change the cursor to a 'wait' cursor */
}

View File

@@ -15,4 +15,87 @@ document.addEventListener('DOMContentLoaded', function() {
select.addEventListener('change', toggleSections);
toggleSections(); // Set initial state
});
document.addEventListener('DOMContentLoaded', function() {
// Parse the initial server time from the input value
const clockElement = document.getElementById('real-time-clock');
if (!clockElement) return;
// Get the initial server time from the input's value
let serverTime = new Date(clockElement.value.replace(' ', 'T'));
function updateDateTime() {
// Format the date/time string as desired
const daysOfWeek = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
const months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
const dayOfWeek = daysOfWeek[serverTime.getDay()];
const month = months[serverTime.getMonth()];
const day = serverTime.getDate();
const year = serverTime.getFullYear();
let hours = serverTime.getHours();
const ampm = hours >= 12 ? 'PM' : 'AM';
hours = hours % 12 || 12;
const minutes = serverTime.getMinutes().toString().padStart(2, '0');
const seconds = serverTime.getSeconds().toString().padStart(2, '0');
const dateTimeString = `${dayOfWeek}, ${month} ${day}, ${year} ${hours}:${minutes}:${seconds} ${ampm}`;
clockElement.value = dateTimeString;
// Advance serverTime by one second
serverTime.setSeconds(serverTime.getSeconds() + 1);
}
updateDateTime();
setInterval(updateDateTime, 1000);
});
document.addEventListener('DOMContentLoaded', function() {
const btn = document.getElementById('test-ntp-btn');
const input = document.getElementById('ntpserver');
const result = document.getElementById('ntp-test-result');
btn.addEventListener('click', function() {
const server = input.value.trim();
result.className = 'ntp-test-result'; // reset
if (!server) {
result.textContent = "Please enter a server address.";
result.classList.add('ntp-test-error');
return;
}
result.textContent = "Testing...";
result.classList.add('ntp-test-wait');
fetch('/smanager/datetimet', {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({ ntpserver: server })
})
.then(response => {
if (!response.ok) {
// HTTP error, e.g., 404, 500
throw new Error(`HTTP error: ${response.status} ${response.statusText}`);
}
return response.json();
})
.then(data => {
result.className = 'ntp-test-result'; // reset
if (data.success) {
result.textContent = `Server time: ${data.time}`;
result.classList.add('ntp-test-success');
} else {
result.textContent = `Error: ${data.error}`;
result.classList.add('ntp-test-error');
}
})
.catch(error => {
// Network error or thrown HTTP error
result.className = 'ntp-test-result ntp-test-error';
result.textContent = `Request failed: ${error.message}`;
});
});
});

View File

@@ -0,0 +1,5 @@
//
//Generated by: SM2Gen version:0.9(20Jan2025) Chameleon version:4.5.4 On Python:3.12.3 at 2025-06-29 08:53:20
//
$(document).ready(function() {
});

View File

@@ -28,4 +28,16 @@ $(document).ready(function() {
var iconSrc = inputType === 'password' ? 'images/visible.png' : 'images/visible-slash.png';
$(this).attr('src', iconSrc);
});
});
// and busy cursor
$(document).ready(function() {
// Handle form submission for any form
$('form').on('submit', function(event) {
// Disable all submit buttons and update their labels
$(this).find('button[type="submit"]').prop('disabled', true).text('Please wait...');
$(this).find('input[type="submit"]').prop('disabled', true).val('Please wait...');
// Add busy cursor
$('body').addClass('busy');
});
});

View File

@@ -2,80 +2,80 @@
% content_for 'module' => begin
<div id='module' class='module back_tape_configure-panel'>
<div id='module' class='module back_tape_configure-panel'>
% if (config->{debug} == 1) {
<p>
%= dumper $c->current_route
%= dumper $bac_datas
</p>
<p>
%= dumper $c->current_route
%= dumper $bac_datas
</p>
% }
% if ( stash 'error' ) {
<br><div class=sme-error>
%= $c->render_to_string(inline => stash 'error')
</div>
%}
% if ( stash 'error' ) {
<br><div class=sme-error>
%= $c->render_to_string( inline => stash 'error' )
</div>
% }
<h1><%= $title%></h1>
<h1><%= $title %></h1>
<h2>
%=l 'bac_ENABLE_DISABLE_TAPE'
</h2><br>
<h2>
%= l 'bac_ENABLE_DISABLE_TAPE'
</h2><br>
%= $c->render_to_string(inline => (l 'bac_TAPE_CONFIG_DESC'))
%= $c->render_to_string( inline => ( l 'bac_TAPE_CONFIG_DESC' ) )
%= form_for '/backupd' => (method => 'POST') => begin
%= form_for '/backupd' => ( method => 'POST' ) => begin
<p>
<span class=label>
%=l 'bac_ENABLE_TAPE_BACKUP'
</span><span class=data>
% if ( $bac_datas->{status} eq 'checked' ) {
<input type='checkbox' name='Tapebackup' checked >
%} else {
%= check_box 'Tapebackup'
%}
</span>
</p>
<p>
<span class=label>
%= l 'bac_ENABLE_TAPE_BACKUP'
</span><span class=data>
% if ( $bac_datas->{status} eq 'checked' ) {
<input type='checkbox' name='Tapebackup' checked >
% } else {
%= check_box 'Tapebackup'
% }
</span>
</p>
<p>
<span class=label>
%=l 'bac_TAPE_BACKUP_TIME'
</span><span class=data>
% param 'BackupHour' => $bac_datas->{backupHour} unless param 'BackupHour';
%= text_field 'BackupHour', size => '2'
% param 'BackupMin' => $bac_datas->{backupMin} unless param 'BackupMin';
%= text_field 'BackupMin', size => '2'
</span>
<!--span class=label-->
%=l 'AM/PM:'
<!--/span--><span class=data>
% param 'BackupAMPM' => $bac_datas->{backupAMPM} unless param 'BackupAMPM';
%= select_field 'BackupAMPM' => ['AM', 'PM'], class => 'input'
</span>
</p>
<p>
<span class=label>
%= l 'bac_TAPE_BACKUP_TIME'
</span><span class=data>
% param 'BackupHour' => $bac_datas->{backupHour} unless param 'BackupHour';
%= text_field 'BackupHour', size => '2'
% param 'BackupMin' => $bac_datas->{backupMin} unless param 'BackupMin';
%= text_field 'BackupMin', size => '2'
</span>
<!--span class=label-->
%= l 'AM/PM:'
<!--/span--><span class=data>
% param 'BackupAMPM' => $bac_datas->{backupAMPM} unless param 'BackupAMPM';
%= select_field 'BackupAMPM' => [ 'AM', 'PM' ], class => 'input'
</span>
</p>
<p>
<span class=label>
%=l 'bac_LOAD_TAPE_REMINDER_TIME'
</span><span class=data>
% param 'ReminderHour' => $bac_datas->{reminderHour} unless param 'ReminderHour';
%= text_field 'ReminderHour', size => '2'
% param 'ReminderMin' => $bac_datas->{reminderMin} unless param 'ReminderMin';
%= text_field 'ReminderMin', size => '2'
</span>
<!--span class=label-->
%=l 'AM/PM:'
<!--/span--><span class=data>
% param 'ReminderAMPM' => $bac_datas->{reminderAMPM} unless param 'ReminderAMPM';
%= select_field 'ReminderAMPM' => ['AM', 'PM'], class => 'input'
</span>
</p><br>
<p>
<span class=label>
%= l 'bac_LOAD_TAPE_REMINDER_TIME'
</span><span class=data>
% param 'ReminderHour' => $bac_datas->{reminderHour} unless param 'ReminderHour';
%= text_field 'ReminderHour', size => '2'
% param 'ReminderMin' => $bac_datas->{reminderMin} unless param 'ReminderMin';
%= text_field 'ReminderMin', size => '2'
</span>
<!--span class=label-->
%= l 'AM/PM:'
<!--/span--><span class=data>
% param 'ReminderAMPM' => $bac_datas->{reminderAMPM} unless param 'ReminderAMPM';
%= select_field 'ReminderAMPM' => [ 'AM', 'PM' ], class => 'input'
</span>
</p><br>
%= hidden_field 'Function' => $bac_datas->{'function'}
%= submit_button $c->l('bac_UPDATE_CONF'), class => 'action'
%= hidden_field 'Function' => $bac_datas->{'function'}
%= submit_button $c->l('bac_UPDATE_CONF'), class => 'action'
% end
% end
</div>
% end
% end

View File

@@ -2,36 +2,36 @@
% content_for 'module' => begin
<div id='module' class='module back_tape_restore-panel'>
<div id='module' class='module back_tape_restore-panel'>
% if (config->{debug} == 1) {
<p>
%= dumper $c->current_route
%= dumper $bac_datas
</p>
<p>
%= dumper $c->current_route
%= dumper $bac_datas
</p>
% }
% if ( stash 'error' ) {
<br><div class=sme-error>
%= $c->render_to_string(inline => stash 'error')
</div>
%}
% if ( stash 'error' ) {
<br><div class=sme-error>
%= $c->render_to_string( inline => stash 'error' )
</div>
% }
<h1><%= $title%></h1>
<h1><%= $title %></h1>
%= form_for '/backupd' => (method => 'POST') => begin
%= form_for '/backupd' => ( method => 'POST' ) => begin
<h2>
%=l 'bac_RESTORE_CONF_FROM_TAPE'
</h2>
<h2>
%= l 'bac_RESTORE_CONF_FROM_TAPE'
</h2>
%= $c->render_to_string(inline => (l 'bac_RESTORE_CONF_FROM_TAPE_DESC'))
%= $c->render_to_string( inline => ( l 'bac_RESTORE_CONF_FROM_TAPE_DESC' ) )
<br>
<br>
%= hidden_field 'Function' => $bac_datas->{'function'}
%= hidden_field 'Function' => $bac_datas->{'function'}
%= submit_button $c->l('bac_RESTORE_FROM_TAPE'), class => 'action'
%= submit_button $c->l('bac_RESTORE_FROM_TAPE'), class => 'action'
% end
% end
</div>
% end
% end

View File

@@ -2,52 +2,52 @@
% content_for 'module' => begin
<div id='module' class='module back_workstn_configure-panel'>
<div id='module' class='module back_workstn_configure-panel'>
% if (config->{debug} == 1) {
<p>
%= dumper $c->current_route
%= dumper $bac_datas
</p>
<p>
%= dumper $c->current_route
%= dumper $bac_datas
</p>
% }
% if ( stash 'error' ) {
<br><div class=sme-error>
%= $c->render_to_string(inline => stash 'error')
</div>
%}
% if ( stash 'error' ) {
<br><div class=sme-error>
%= $c->render_to_string( inline => stash 'error' )
</div>
% }
<h1><%= $title%></h1>
<h1><%= $title %></h1>
%= form_for '/backup' => (method => 'POST') => begin
%= form_for '/backup' => ( method => 'POST' ) => begin
<h2>
%=l 'bac_CONFIGURE_WORKSTN_BACKUP'
</h2>
<h2>
%= l 'bac_CONFIGURE_WORKSTN_BACKUP'
</h2>
%= $c->render_to_string(inline => (l 'bac_WORKSTN_BACKUP_DESC'))
%= $c->render_to_string( inline => ( l 'bac_WORKSTN_BACKUP_DESC' ) )
%=l 'bac_WORKSTN_BACKUP_ENABLED'
<span class=data>
%= $bac_datas->{status}
</span><br>
%= l 'bac_WORKSTN_BACKUP_ENABLED'
<span class=data>
%= $bac_datas->{status}
</span><br>
%= $c->render_to_string(inline => $c->workstnBackupConfig())
%= $c->render_to_string( inline => $c->workstnBackupConfig() )
<p><h3>
%= l 'bac_WORKSTATION_BACKUP_SETCONF'
</h3><br>
<span class=label>
%=l 'bac_SELECT_VFS_TYPE'
</span><span class=data>
% param 'VFSType' => $bac_datas->{vfstype} unless param 'VFSType';
%= select_field 'VFSType' => $c->get_VFSType_options(), class => 'input'
</span></p>
<p><h3>
%= l 'bac_WORKSTATION_BACKUP_SETCONF'
</h3><br>
<span class=label>
%= l 'bac_SELECT_VFS_TYPE'
</span><span class=data>
% param 'VFSType' => $bac_datas->{vfstype} unless param 'VFSType';
%= select_field 'VFSType' => $c->get_VFSType_options(), class => 'input'
</span></p>
%= hidden_field 'Function' => $bac_datas->{'function'} . '1'
%= submit_button $c->l('NEXT'), class => 'action'
%= hidden_field 'Function' => $bac_datas->{'function'} . '1'
%= submit_button $c->l('NEXT'), class => 'action'
% end
% end
</div>
% end
% end

View File

@@ -2,153 +2,153 @@
% content_for 'module' => begin
<div id='module' class='module back_workstn_configure1-panel'>
<div id='module' class='module back_workstn_configure1-panel'>
% if (config->{debug} == 1) {
<p>
%= dumper $c->current_route
%= dumper $bac_datas
</p>
<p>
%= dumper $c->current_route
%= dumper $bac_datas
</p>
% }
% if ( stash 'error' ) {
<br><div class=sme-error>
%= $c->render_to_string(inline => stash 'error')
</div>
%}
% if ( stash 'error' ) {
<br><div class=sme-error>
%= $c->render_to_string( inline => stash 'error' )
</div>
% }
<h1><%= $title%></h1>
<h1><%= $title %></h1>
<h2>
%=l 'bac_CONFIGURE_WORKSTN_BACKUP'
</h2>
<h2>
%= l 'bac_CONFIGURE_WORKSTN_BACKUP'
</h2>
%= $c->render_to_string(inline => (l 'bac_CONFIGURE_WORKSTN_BACKUP_DESC'))
%= $c->render_to_string( inline => ( l 'bac_CONFIGURE_WORKSTN_BACKUP_DESC' ) )
%= form_for '/backupd' => (method => 'POST') => begin
%= form_for '/backupd' => ( method => 'POST' ) => begin
<p>
<span class=label>
%=l 'bac_ENABLE_WORKSTN_BACKUP'
</span><span class=data>
% if ( $bac_datas->{status} eq 'checked' ) {
<input type='checkbox' name='Workstnbackup' checked >
%} else {
%= check_box 'Workstnbackup'
%}
</span>
<p>
<span class=label>
%= l 'bac_ENABLE_WORKSTN_BACKUP'
</span><span class=data>
% if ( $bac_datas->{status} eq 'checked' ) {
<input type='checkbox' name='Workstnbackup' checked >
% } else {
%= check_box 'Workstnbackup'
% }
</span>
</p>
<p><h3>
%= l 'bac_WORKSTATION_BACKUP_DEST'
</h3><br>
</p>
<p><h3>
%= l 'bac_WORKSTATION_BACKUP_DEST'
</h3><br>
% if ( $bac_datas->{vfstype} =~ m/cifs|nfs/s ) {
<span class=label>
%=l 'bac_WORKSTN_NAME'
</span><span class=data>
% param 'BackupwkStation' => $bac_datas->{station} unless param 'BackupwkStation';
%= text_field 'BackupwkStation', size => 20, class => 'input'
</span><br>
%}
% if ( $bac_datas->{vfstype} eq 'usb' ) {
<span class=label>
%=l 'bac_local removable disk'
</span><span class=data>
% param 'BackupwkFolder' => $bac_datas->{mount} unless param 'BackupwkFolder';
%= select_field 'BackupwkFolder' => $c->get_BackupwkDest_options( $bac_datas->{vfstype}), class => 'input'
</span><br>
<span class=label>
%= l 'bac_WORKSTN_NAME'
</span><span class=data>
% param 'BackupwkStation' => $bac_datas->{station} unless param 'BackupwkStation';
%= text_field 'BackupwkStation', size => 20, class => 'input'
</span><br>
% }
% if ( $bac_datas->{vfstype} eq 'usb' ) {
<span class=label>
%= l 'bac_local removable disk'
</span><span class=data>
% param 'BackupwkFolder' => $bac_datas->{mount} unless param 'BackupwkFolder';
%= select_field 'BackupwkFolder' => $c->get_BackupwkDest_options( $bac_datas->{vfstype} ), class => 'input';
</span><br>
% } elsif ( $bac_datas->{vfstype} eq 'mnt') {
<span class=label>
%=l 'bac_Mounted disk'
</span><span class=data>
% param 'BackupwkFolder' => $bac_datas->{folder} unless param 'BackupwkFolder';
%= select_field 'BackupwkFolder' => $c->get_BackupwkDest_options( $bac_datas->{vfstype}), class => 'input'
</span><br>
<span class=label>
%= l 'bac_Mounted disk'
</span><span class=data>
% param 'BackupwkFolder' => $bac_datas->{folder} unless param 'BackupwkFolder';
%= select_field 'BackupwkFolder' => $c->get_BackupwkDest_options( $bac_datas->{vfstype} ), class => 'input';
</span><br>
% } else {
<span class=label>
%=l 'bac_SHARED_FOLDER_NAME'
</span><span class=data>
% param 'BackupwkFolder' => $bac_datas->{folder} unless param 'BackupwkFolder';
%= text_field 'BackupwkFolder', size => 20, class => 'input'
</span><br>
%}
% if ( $bac_datas->{vfstype} eq 'cifs' ) {
<span class=label>
%=l 'bac_WORKSTN_LOGIN'
</span><span class=data>
% param 'BackupwkLogin' => $bac_datas->{login} unless param 'BackupwkLogin';
%= text_field 'BackupwkLogin', size => 12, class => 'input'
</span><br><span class=label>
%=l 'bac_PASSWORD'
</span><span class=data>
% param 'BackupwkPassword' => $bac_datas->{password} unless param 'BackupwkPassword';
%= password_field 'BackupwkPassword', size => 12, class => 'input'
</span>
%}
</p><br><h3>
%= l 'bac_WORKSTN_BACKUP_SETTINGS'
</h3><br>
<span class=label>
%= l 'bac_SHARED_FOLDER_NAME'
</span><span class=data>
% param 'BackupwkFolder' => $bac_datas->{folder} unless param 'BackupwkFolder';
%= text_field 'BackupwkFolder', size => 20, class => 'input'
</span><br>
% }
% if ( $bac_datas->{vfstype} eq 'cifs' ) {
<span class=label>
%= l 'bac_WORKSTN_LOGIN'
</span><span class=data>
% param 'BackupwkLogin' => $bac_datas->{login} unless param 'BackupwkLogin';
%= text_field 'BackupwkLogin', size => 12, class => 'input'
</span><br><span class=label>
%= l 'bac_PASSWORD'
</span><span class=data>
% param 'BackupwkPassword' => $bac_datas->{password} unless param 'BackupwkPassword';
%= password_field 'BackupwkPassword', size => 12, class => 'input'
</span>
% }
</p><br><h3>
%= l 'bac_WORKSTN_BACKUP_SETTINGS'
</h3><br>
<p><span class=label>
%=l 'bac_NUMBER_OF_SETS'
</span><span class=data>
% param 'SetsNumber' => $bac_datas->{setsNumber} unless param 'SetsNumber';
%= text_field 'SetsNumber', size => '3'
</span>
%=l 'bac_NUMBER_OF_FILES_IN_SET'
<span class=data>
% param 'Filesinset' => $bac_datas->{filesinset} unless param 'Filesinset';
%= text_field 'Filesinset', size => '3'
</span></p>
<p><span class=label>
%= l 'bac_NUMBER_OF_SETS'
</span><span class=data>
% param 'SetsNumber' => $bac_datas->{setsNumber} unless param 'SetsNumber';
%= text_field 'SetsNumber', size => '3'
</span>
%= l 'bac_NUMBER_OF_FILES_IN_SET'
<span class=data>
% param 'Filesinset' => $bac_datas->{filesinset} unless param 'Filesinset';
%= text_field 'Filesinset', size => '3'
</span></p>
<p>
<span class=label>
%=l 'bac_WORKSTN_BACKUP_TIME'
</span><span class=data>
% param 'BackupwkHour' => $bac_datas->{hour} unless param 'BackupwkHour';
%= text_field 'BackupwkHour', size => '2'
% param 'BackupwkMin' => $bac_datas->{min} unless param 'BackupwkMin';
%= text_field 'BackupwkMin', size => '2'
</span>
%=l 'AM/PM:'
<span class=data>
% param 'BackupwkAMPM' => $bac_datas->{ampm} unless param 'BackupwkAMPM';
%= select_field 'BackupwkAMPM' => ['AM', 'PM'], class => 'input'
</span>
</p>
<p>
<span class=label>
%= l 'bac_WORKSTN_BACKUP_TIME'
</span><span class=data>
% param 'BackupwkHour' => $bac_datas->{hour} unless param 'BackupwkHour';
%= text_field 'BackupwkHour', size => '2'
% param 'BackupwkMin' => $bac_datas->{min} unless param 'BackupwkMin';
%= text_field 'BackupwkMin', size => '2'
</span>
%= l 'AM/PM:'
<span class=data>
% param 'BackupwkAMPM' => $bac_datas->{ampm} unless param 'BackupwkAMPM';
%= select_field 'BackupwkAMPM' => [ 'AM', 'PM' ], class => 'input'
</span>
</p>
<p><span class=label>
%=l 'bac_WORKSTN_TIMEOUT'
</span><span class=data>
% param 'BackupwkTimeout' => $bac_datas->{timeout} unless param 'BackupwkTimeout';
%= text_field 'BackupwkTimeout', size => '2'
</span>
%=l 'bac_INC_ONLY_TIMEOUT'
<span class=data>
% if ( $bac_datas->{incOnlyTimeout} eq 'checked' ) {
<input type='checkbox' name='IncOnlyTimeout' checked >
%} else {
%= check_box 'IncOnlyTimeout'
%}
</span></p>
<p><span class=label>
%= l 'bac_WORKSTN_TIMEOUT'
</span><span class=data>
% param 'BackupwkTimeout' => $bac_datas->{timeout} unless param 'BackupwkTimeout';
%= text_field 'BackupwkTimeout', size => '2'
</span>
%= l 'bac_INC_ONLY_TIMEOUT'
<span class=data>
% if ( $bac_datas->{incOnlyTimeout} eq 'checked' ) {
<input type='checkbox' name='IncOnlyTimeout' checked >
% } else {
%= check_box 'IncOnlyTimeout'
% }
</span></p>
<p>
<span class=label>
%=l 'bac_COMPRESSION_LEVEL'
</span><span class=data>
% param 'Compression' => $bac_datas->{compression} unless param 'Compression';
%= text_field 'Compression', size => '1'
</span>
%=l 'bac_FULL_ONLY_ON'
<span class=data>
% param 'Dof' => $bac_datas->{dof} unless param 'Dof';
%= select_field 'Dof' => $c->get_dow_list(), class => 'input'
</p><br>
<p>
<span class=label>
%= l 'bac_COMPRESSION_LEVEL'
</span><span class=data>
% param 'Compression' => $bac_datas->{compression} unless param 'Compression';
%= text_field 'Compression', size => '1'
</span>
%= l 'bac_FULL_ONLY_ON'
<span class=data>
% param 'Dof' => $bac_datas->{dof} unless param 'Dof';
%= select_field 'Dof' => $c->get_dow_list(), class => 'input'
</p><br>
%= hidden_field 'Function' => $bac_datas->{function}
%= hidden_field 'VFSType' => $bac_datas->{vfstype}
%= submit_button $c->l('bac_UPDATE_CONF'), class => 'action'
%= hidden_field 'Function' => $bac_datas->{function}
%= hidden_field 'VFSType' => $bac_datas->{vfstype}
%= submit_button $c->l('bac_UPDATE_CONF'), class => 'action'
% end
</div>
% end
</div>
% end

View File

@@ -2,43 +2,43 @@
% content_for 'module' => begin
<div id='module' class='module back_workstn_restore-panel'>
<div id='module' class='module back_workstn_restore-panel'>
% if (config->{debug} == 1) {
<p>
%= dumper $c->current_route
%= dumper $bac_datas
</p>
<p>
%= dumper $c->current_route
%= dumper $bac_datas
</p>
% }
% if ( stash 'error' ) {
<br><div class=sme-error>
%= $c->render_to_string(inline => stash 'error')
</div>
%}
% if ( stash 'error' ) {
<br><div class=sme-error>
%= $c->render_to_string( inline => stash 'error' )
</div>
% }
<h1><%= $title%></h1>
<h1><%= $title %></h1>
%= form_for '/backupd' => (method => 'POST') => begin
%= form_for '/backupd' => ( method => 'POST' ) => begin
<h2>
%=l 'bac_WORKSTN_RESTORE'
</h2>
<h2>
%= l 'bac_WORKSTN_RESTORE'
</h2>
<br><br>
<br><br>
% if ($bac_datas->{status} ne 'enabled') {
%= $c->render_to_string(inline => (l 'bac_CONFIGURATION_TO_BE_DONE'))
%= $c->render_to_string( inline => ( l 'bac_CONFIGURATION_TO_BE_DONE' ) )
% } else {
%= $c->render_to_string(inline => (l 'bac_RESTORE_CONF_FROM_WORKSTN_DESC') . ' ' . $c->get_shared_folder_to_verify())
%}
%= $c->render_to_string( inline => ( l 'bac_RESTORE_CONF_FROM_WORKSTN_DESC' ) . ' ' . $c->get_shared_folder_to_verify() );
% }
<br><br><span class=label>
%=l 'bac_SELECT_BACKUP_FILE'
</span><span class=data>
%= select_field 'Backupset' => $c->get_Backupset_options(), class => 'input'
</span><br><br>
<br><br><span class=label>
%= l 'bac_SELECT_BACKUP_FILE'
</span><span class=data>
%= select_field 'Backupset' => $c->get_Backupset_options(), class => 'input'
</span><br><br>
%= hidden_field 'Function' => $bac_datas->{'function'}
%= submit_button $c->l('bac_RESTORE_FROM_WORKSTN'), class => 'action'
% end
%= hidden_field 'Function' => $bac_datas->{'function'}
%= submit_button $c->l('bac_RESTORE_FROM_WORKSTN'), class => 'action'
% end
</div>
% end
% end

View File

@@ -1,36 +1,59 @@
% layout 'default', title => "Sme server 2 - restore";
%= stylesheet '/css/backup.css'
% content_for 'module' => begin
<div id='module' class='module back_workstn_restore1-panel'>
<div id='module' class='module back_workstn_restore1-panel'>
%= javascript '/js/backup_workstation_restore.js'
% if (config->{debug} == 1) {
<p>
%= dumper $c->current_route
%= dumper $bac_datas
</p>
<p>
%= dumper $c->current_route
%= dumper $bac_datas
</p>
% }
% if ( stash 'error' ) {
<br><div class=sme-error>
%= $c->render_to_string(inline => stash 'error')
</div>
%}
% if ( stash 'error' ) {
<br><div class=sme-error>
%= $c->render_to_string( inline => stash 'error' )
</div>
% }
<h1><%= $title%></h1>
<h1><%= $title %></h1>
%= form_for '/backupd' => (method => 'POST') => begin
%= form_for '/backupd' => ( method => 'POST' ) => begin
<h2>
%=l 'bac_WORKSTN_RESTORE'
</h2>
<p>
%= $c->render_to_string(inline => $bac_datas->{restore_log})
</p><p>
%=l 'bac_YOU_MUST_REBOOT'
</p>
%= hidden_field 'Function' => $bac_datas->{'function'}
%= submit_button $c->l('bac_REBOOT'), class => 'action'
% end
<h2>
%= l 'bac_WORKSTN_RESTORE'
</h2>
<fieldset>
<div id="status-container">
<div><strong>Stage:</strong> <span id="stage">-</span></div>
<div id="progress-bar" aria-label="progress bar" role="progressbar" aria-valuemin="0" aria-valuemax="100">
<div id="progress-bar-inner">0%</div>
</div>
<div id="message-log-container">
<h3>Console Output:</h3>
<div id="message-log"></div>
</div>
<div id="completion-status"></div>
</div>
</fieldset>
<!--
<p>
<fieldset>
%= $c->render_to_string( inline => $bac_datas->{restore_log} )
</fieldset>
</p>
-->
<p>
%= l 'bac_YOU_MUST_REBOOT'
</p>
%= hidden_field 'Function' => $bac_datas->{'function'}
%= submit_button $c->l('bac_REBOOT'), class => 'action'
% end
</div>
% end
% end

View File

@@ -2,47 +2,47 @@
% content_for 'module' => begin
<div id='module' class='module back_workstn_sel_restore-panel'>
<div id='module' class='module back_workstn_sel_restore-panel'>
% if (config->{debug} == 1) {
<p>
%= dumper $c->current_route
%= dumper $bac_datas
</p>
<p>
%= dumper $c->current_route
%= dumper $bac_datas
</p>
% }
% if ( stash 'error' ) {
<br><div class=sme-error>
%= $c->render_to_string(inline => stash 'error')
</div>
%}
% if ( stash 'error' ) {
<br><div class=sme-error>
%= $c->render_to_string( inline => stash 'error' )
</div>
% }
<h1><%= $title%></h1>
<h1><%= $title %></h1>
%= form_for '/backupd' => (method => 'POST') => begin
%= form_for '/backupd' => ( method => 'POST' ) => begin
<h2><%=l 'bac_WORKSTN_SEL_RESTORE' %></h2>
<h2><%= l 'bac_WORKSTN_SEL_RESTORE' %></h2>
%= $c->render_to_string(inline => (l 'bac_WORKSTN_SEL_REST_DESC') . ' ' . $c->get_shared_folder_to_verify())
%= $c->render_to_string( inline => ( l 'bac_WORKSTN_SEL_REST_DESC' ) . ' ' . $c->get_shared_folder_to_verify() );
<h3><%=l 'bac_BACKUP_CHOICE' %></h3>
<h3><%= l 'bac_BACKUP_CHOICE' %></h3>
<br><span class=label>
%=l 'bac_SELECT_BACKUP_FILE'
</span><span class=data>
%= select_field 'Backupset' => $c->get_Restoreset_options(), class => 'input'
</span><br>
<br><span class=label>
%= l 'bac_SELECT_BACKUP_FILE'
</span><span class=data>
%= select_field 'Backupset' => $c->get_Restoreset_options(), class => 'input'
</span><br>
<br><span class=label>
%=l 'bac_FILTER_EXPRESSION'
</span><span class=data>
%= text_field 'Filterexp', size => 32, class => 'input'
</span><br>
<br>
%= hidden_field 'Function' => $bac_datas->{'function'}
%= submit_button $c->l('PERFORM'), class => 'action'
<br><span class=label>
%= l 'bac_FILTER_EXPRESSION'
</span><span class=data>
%= text_field 'Filterexp', size => 32, class => 'input'
</span><br>
<br>
%= hidden_field 'Function' => $bac_datas->{'function'}
%= submit_button $c->l('PERFORM'), class => 'action'
% end
% end
</div>
% end
% end

View File

@@ -2,48 +2,48 @@
% content_for 'module' => begin
<div id='module' class='module back_workstn_sel_restore1-panel'>
<div id='module' class='module back_workstn_sel_restore1-panel'>
% if (config->{debug} == 1) {
<p>
%= dumper $c->current_route
%= dumper $bac_datas
</p>
<p>
%= dumper $c->current_route
%= dumper $bac_datas
</p>
% }
% if ( stash 'error' ) {
<br><div class=sme-error>
%= $c->render_to_string(inline => stash 'error')
</div>
%}
% if ( stash 'error' ) {
<br><div class=sme-error>
%= $c->render_to_string( inline => stash 'error' )
</div>
% }
<h1><%= $title%></h1>
<h1><%= $title %></h1>
<h2><%=l 'bac_WORKSTN_SELECTIVE_RESTORE' %></h2><br>
<h2><%= l 'bac_WORKSTN_SELECTIVE_RESTORE' %></h2><br>
%= $c->render_to_string(inline => (l 'bac_READ_COMPLETE'))
%= $c->render_to_string( inline => ( l 'bac_READ_COMPLETE' ) )
%= form_for '/backupd' => (method => 'POST') => begin
%= form_for '/backupd' => ( method => 'POST' ) => begin
<br><span class=label>
%=l 'bac_SELECT_FILES_TO_RESTORE'
</span><span class=data>
%= select_field 'Restorefiles' => $c->get_Restorefiles_options($bac_datas->{'filterexp'},$bac_datas->{'backupset'}), class => 'input', multiple => 1, size => 15
</span><br>
<br><span class=label>
%= l 'bac_SELECT_FILES_TO_RESTORE'
</span><span class=data>
%= select_field 'Restorefiles' => $c->get_Restorefiles_options( $bac_datas->{'filterexp'}, $bac_datas->{'backupset'} ), class => 'input', multiple => 1, size => 15;
</span><br>
<br><span class=label>
%=l 'bac_SELECT_DATE_BEFORE'
</span><span class=data>
%= text_field 'Seldatebefore', size => 32, class => 'input'
</span><br>
<br>
%= hidden_field 'Function' => $bac_datas->{'function'}
%= hidden_field 'Backupset' => $bac_datas->{'backupset'}
%= hidden_field 'Filterexp' => $bac_datas->{'filterexp'}
<br><span class=label>
%= l 'bac_SELECT_DATE_BEFORE'
</span><span class=data>
%= text_field 'Seldatebefore', size => 32, class => 'input'
</span><br>
<br>
%= hidden_field 'Function' => $bac_datas->{'function'}
%= hidden_field 'Backupset' => $bac_datas->{'backupset'}
%= hidden_field 'Filterexp' => $bac_datas->{'filterexp'}
%= submit_button $c->l('PERFORM'), class => 'action'
%= submit_button $c->l('PERFORM'), class => 'action'
% end
% end
</div>
% end
% end

View File

@@ -2,31 +2,31 @@
% content_for 'module' => begin
<div id='module' class='module back_workstn_sel_restore2-panel'>
<div id='module' class='module back_workstn_sel_restore2-panel'>
% if (config->{debug} == 1) {
<p>
%= dumper $c->current_route
%= dumper $bac_datas
</p>
<p>
%= dumper $c->current_route
%= dumper $bac_datas
</p>
% }
% if ( stash 'error' ) {
<br><div class=sme-error>
%= $c->render_to_string(inline => stash 'error')
</div>
%}
% if ( stash 'error' ) {
<br><div class=sme-error>
%= $c->render_to_string( inline => stash 'error' )
</div>
% }
<h1><%= $title%></h1>
<h2><%=l 'bac_WORKSTN_SELECTIVE_RESTORE' %></h2>
<br>
%= $c->render_to_string(inline => $bac_datas->{restore_log})
<br>
<h1><%= $title %></h1>
<h2><%= l 'bac_WORKSTN_SELECTIVE_RESTORE' %></h2>
<br>
%= $c->render_to_string( inline => $bac_datas->{restore_log} )
<br>
%= form_for '/backupd' => (method => 'POST') => begin
%= hidden_field 'Function' => $bac_datas->{'function'}
%= submit_button $c->l('NEXT'), class => 'action'
%= form_for '/backupd' => ( method => 'POST' ) => begin
%= hidden_field 'Function' => $bac_datas->{'function'}
%= submit_button $c->l('NEXT'), class => 'action'
% end
% end
</div>
% end
% end

View File

@@ -1,51 +1,51 @@
% layout 'default', title => "Sme server 2 - backup - verify";
% content_for 'module' => begin
<div id='module' class='module back_workstn_verify-panel'>
<div id='module' class='module back_workstn_verify-panel'>
% if (config->{debug} == 1) {
<p>
%= dumper $c->current_route
%= dumper $bac_datas
</p>
<p>
%= dumper $c->current_route
%= dumper $bac_datas
</p>
% }
% if ( stash 'error' ) {
<br><div class=sme-error>
%= $c->render_to_string(inline => stash 'error')
</div>
%}
% if ( stash 'error' ) {
<br><div class=sme-error>
%= $c->render_to_string( inline => stash 'error' )
</div>
% }
<h1><%= $title%></h1>
<h1><%= $title %></h1>
<h2>
%=l 'bac_VERIFY_WORKSTN_BACKUP_FILE'
</h2>
<h2>
%= l 'bac_VERIFY_WORKSTN_BACKUP_FILE'
</h2>
%= form_for '/backup' => (method => 'POST') => begin
%= form_for '/backup' => ( method => 'POST' ) => begin
% if ($bac_datas->{status} ne 'enabled') {
%= $c->render_to_string(inline => (l 'bac_CONFIGURATION_TO_BE_DONE'))
%= $c->render_to_string( inline => ( l 'bac_CONFIGURATION_TO_BE_DONE' ) )
% } else {
%= $c->render_to_string(inline => (l 'bac_VERIFY_WORKSTN_BACKUP_DESC') . ' ' . $c->get_shared_folder_to_verify())
%}
<br><br><span class=label>
%=l 'bac_SELECT_BACKUP_FILE'
</span><span class=data>
%= select_field 'Backupset' => $c->get_Backupset_options(), class => 'input'
</span><br>
%= $c->render_to_string( inline => ( l 'bac_VERIFY_WORKSTN_BACKUP_DESC' ) . ' ' . $c->get_shared_folder_to_verify() );
% }
<br><br><span class=label>
%= l 'bac_SELECT_BACKUP_FILE'
</span><span class=data>
%= select_field 'Backupset' => $c->get_Backupset_options(), class => 'input'
</span><br>
<p><span class=label>
%=l 'bac_CHECK_TO_VERIFY_FULL_RESTORE'
</span><span class=data>
%= check_box 'Verifyall'
</span></p><br>
<p><span class=label>
%= l 'bac_CHECK_TO_VERIFY_FULL_RESTORE'
</span><span class=data>
%= check_box 'Verifyall'
</span></p><br>
%=l 'bac_CHECK_INTEGRITY_WARNING'
%= l 'bac_CHECK_INTEGRITY_WARNING'
<br><br>
%= hidden_field 'Function' => $bac_datas->{'function'} . '1'
%= submit_button $c->l('bac_VERIFY'), class => 'action'
<br><br>
%= hidden_field 'Function' => $bac_datas->{'function'} . '1'
%= submit_button $c->l('bac_VERIFY'), class => 'action'
% end
% end
</div>
% end
% end

View File

@@ -1,35 +1,35 @@
% layout 'default', title => "Sme server 2 - backup - verify";
% content_for 'module' => begin
<div id='module' class='module back_workstn_verify1-panel'>
<div id='module' class='module back_workstn_verify1-panel'>
% if (config->{debug} == 1) {
<p>
%= dumper $c->current_route
%= dumper $bac_datas->{function}
<!-- dumper $bac_datas->{'files_list'} -->
</p>
<p>
%= dumper $c->current_route
%= dumper $bac_datas->{function}
<!-- dumper $bac_datas->{'files_list'} -->
</p>
% }
% if ( stash 'error' ) {
<br><div class=sme-error>
%= $c->render_to_string(inline => stash 'error')
</div>
%}
% if ( stash 'error' ) {
<br><div class=sme-error>
%= $c->render_to_string( inline => stash 'error' )
</div>
% }
<h1><%= $title%></h1>
<h1><%= $title %></h1>
<h2><%= l 'bac_VERIFY_WORKSTN_BACKUP_FILE' %></h2>
<h2><%= l 'bac_VERIFY_WORKSTN_BACKUP_FILE' %></h2>
<br>
%= $c->render_to_string(inline => $c->workstnVerify())
<br>
<br>
%= $c->render_to_string( inline => $c->workstnVerify() )
<br>
%= form_for '/backupd' => (method => 'POST') => begin
%= form_for '/backupd' => ( method => 'POST' ) => begin
%= hidden_field 'Function' => $bac_datas->{'function'}
%= submit_button $c->l('NEXT'), class => 'action'
% end
% end
</div>
% end
% end

View File

@@ -1,67 +1,71 @@
<%
my $backups = esmith::BackupHistoryDB->open; # no UTF8
my $now = time();
my $backup_rec = $backups->new_record($now, {
type => 'backup_record', BackupType => 'desktop',
StartEpochTime => $now,
});
# Dump the current mysql tables so that they are part of the image.
# The events handle cases where mysqld is not enabled, and/or is not running.
my $status = system("/sbin/e-smith/signal-event", "pre-backup", "desktop");
if ($status) {
$c->desktopBackupRecordStatus($backup_rec, 'pre-backup', $status);
return ($c->l('bac_OPERATION_STATUS_REPORT').$c->l('bac_ERR_PRE_BACKUP'));
my $backups = esmith::BackupHistoryDB->open; # no UTF8
my $now = time();
my $backup_rec = $backups->new_record(
$now,
{
type => 'backup_record',
BackupType => 'desktop',
StartEpochTime => $now,
}
);
my $clvl = $c->stash('compressionlevel');
my $cmd = "/bin/tar --create --file=- --directory / @{$c->stash('exclude')} "
. "@{$c->stash('directories')} | /usr/bin/gzip $clvl ";
# Dump the current mysql tables so that they are part of the image.
# The events handle cases where mysqld is not enabled, and/or is not running.
my $status = system( "/sbin/e-smith/signal-event", "pre-backup", "desktop" );
if ($status) {
$c->desktopBackupRecordStatus( $backup_rec, 'pre-backup', $status );
return ( $c->l('bac_OPERATION_STATUS_REPORT') . $c->l('bac_ERR_PRE_BACKUP') );
}
my $success = open my $fh, '-|', $cmd;
#unless ($success) { return "Error download command."; };
if ($success) {
# Try with download plugin - seems to fail to complete download and also
# name of file deposited is not as required.
#my $output = do { local $/; <$fh> };
#close $fh;
#$c->render_file(
#data => $output,
#filename => 'output.txt',
#content_type => 'text/plain'
#);
# So organise it ourselves.
$c->res->headers->content_type('application/x-tar');
$c->res->headers->content_disposition(qq/attachment; filename="smeserver.tgz"/);
my $cb;
$cb = sub {
my $c = shift;
my $size = 500 * 1024;
my $length = sysread($fh, my $buffer, $size);
unless ($length) {
close $fh;
undef $cb;
$c->finish;
return;
}
$c->write_chunk($buffer, $cb);
};
$c->$cb;
} else {
$c->render(text => "Failed to execute command: $!", status => 500);
}
my $clvl = $c->stash('compressionlevel');
my $cmd = "/bin/tar --create --file=- --directory / @{$c->stash('exclude')} "
. "@{$c->stash('directories')} | /usr/bin/gzip $clvl ";
# Remove the dumped tables.
$status = system("/sbin/e-smith/signal-event", "post-backup", "desktop");
if ($status) {
$c->desktopBackupRecordStatus($backup_rec, 'post-backup', $status);
die ($c->l('bac_ERR_POST_BACKUP'),"\n");
}
my $success = open my $fh, '-|', $cmd;
#unless ($success) { return "Error download command."; };
if ($success) {
# Try with download plugin - seems to fail to complete download and also
# name of file deposited is not as required.
#my $output = do { local $/; <$fh> };
#close $fh;
#$c->render_file(
#data => $output,
#filename => 'output.txt',
#content_type => 'text/plain'
#);
# So organise it ourselves.
$c->res->headers->content_type('application/x-tar');
$c->res->headers->content_disposition(qq/attachment; filename="smeserver.tgz"/);
my $cb;
$cb = sub {
my $c = shift;
my $size = 500 * 1024;
my $length = sysread( $fh, my $buffer, $size );
unless ($length) {
close $fh;
undef $cb;
$c->finish;
return;
}
$c->write_chunk( $buffer, $cb );
};
$c->$cb;
}
else {
$c->render( text => "Failed to execute command: $!", status => 500 );
}
$now = time();
$backup_rec->set_prop('EndEpochTime', "$now");
$backup_rec->set_prop('Result', "0");
# Remove the dumped tables.
$status = system( "/sbin/e-smith/signal-event", "post-backup", "desktop" );
if ($status) {
$c->desktopBackupRecordStatus( $backup_rec, 'post-backup', $status );
die( $c->l('bac_ERR_POST_BACKUP'), "\n" );
}
$now = time();
$backup_rec->set_prop( 'EndEpochTime', "$now" );
$backup_rec->set_prop( 'Result', "0" );
%>
1;

View File

@@ -1,79 +1,78 @@
% layout 'default', title => "Sme server 2 - backup";
% content_for 'module' => begin
<div id='module' class='module backup-panel'>
<div id='module' class='module backup-panel'>
% if (config->{debug} == 1) {
<p>
%= dumper $c->current_route
%= dumper $bac_datas
</p>
<p>
%= dumper $c->current_route
%= dumper $bac_datas
</p>
% }
% if ( stash 'warning' ) {
<br><div class=sme-warning>
%= $c->render_to_string(inline => stash 'warning')
</div>
%}
% if ( stash 'error' ) {
<br><div class=sme-error>
%= $c->render_to_string(inline => stash 'error')
</div>
%}
% if ( stash 'warning' ) {
<br><div class=sme-warning>
%= $c->render_to_string( inline => stash 'warning' )
</div>
% }
% if ( stash 'error' ) {
<br><div class=sme-error>
%= $c->render_to_string( inline => stash 'error' )
</div>
% }
<h1><%= $title%></h1>
<!--br>Still incomplete click here for previous version
<a href="/server-manager/cgi-bin/backup" target='_blank'><b>(Previous Backup version)</b></a>
<br-->
<h1><%= $title %></h1>
<!--br>Still incomplete click here for previous version
<a href="/server-manager/cgi-bin/backup" target='_blank'><b>(Previous Backup version)</b></a>
<br-->
<%= $c->render_to_string(inline => (l 'bac_BACKUP_DESC_DAR', $bac_datas->{module},
$bac_datas->{dumpsize}, $bac_datas->{tarsize})) %>
<%= $c->render_to_string(inline => (l 'bac_BACKUP_DESC_DAR', $bac_datas->{module},
$bac_datas->{dumpsize}, $bac_datas->{tarsize})) %>
%= form_for '/backup' => (method => 'POST') => begin
%= form_for '/backup' => ( method => 'POST' ) => begin
<h2>
%=l 'bac_BACKUP_CONFIG_STATUS'
</h2>
<h2>
%= l 'bac_BACKUP_CONFIG_STATUS'
</h2>
<p><span class=label>
%=l 'bac_TAPE_BACKUPS',
</span><span class=data2>
%= $c->l(uc($bac_datas->{'backupStatus'})).'.'
</span>
% if ( $bac_datas->{'backupStatus'} eq 'enabled' ) {
%= $c->l('bac_BACKUPS_RUN_AT')
<span class=data>
%= $bac_datas->{'backupTime'}
</span>
%= $c->l('bac_REMINDER_MESSAGE_AT')
<span class=data>
%= $bac_datas->{'reminderTime'}
</span>
%}
<p><span class=label>
%=l 'bac_WORKSTN_BACKUPS',
</span><span class=data2>
%= $c->l(uc($bac_datas->{'backupwkStatus'})).'.'
</span>
% if ( $bac_datas->{'backupwkStatus'} eq 'enabled' ) {
%= $c->l('bac_WKBACKUPS_RUN_AT')
<b>
%= $bac_datas->{'backupwkTime'}
</b>
%}
<p><span class=label>
%= l 'bac_TAPE_BACKUPS',
</span><span class=data2>
%= $c->l( uc( $bac_datas->{'backupStatus'} ) ) . '.'
</span>
% if ( $bac_datas->{'backupStatus'} eq 'enabled' ) {
%= $c->l('bac_BACKUPS_RUN_AT')
<span class=data>
%= $bac_datas->{'backupTime'}
</span>
%= $c->l('bac_REMINDER_MESSAGE_AT')
<span class=data>
%= $bac_datas->{'reminderTime'}
</span>
% }
<p><span class=label>
%= l 'bac_WORKSTN_BACKUPS',
</span><span class=data2>
%= $c->l( uc( $bac_datas->{'backupwkStatus'} ) ) . '.'
</span>
% if ( $bac_datas->{'backupwkStatus'} eq 'enabled' ) {
%= $c->l('bac_WKBACKUPS_RUN_AT')
<b>
%= $bac_datas->{'backupwkTime'}
</b>
% }
<p><span class=label>
%=l 'bac_SELECT_AN_ACTION'
</span><span class=data>
% param 'Function' => $bac_datas->{function} unless param 'Function';
%= select_field 'Function' => $c->get_function_options(), class => 'input'
</span></p>
<p><span class=label>
%= l 'bac_SELECT_AN_ACTION'
</span><span class=data>
% param 'Function' => $bac_datas->{function} unless param 'Function';
%= select_field 'Function' => $c->get_function_options(), class => 'input'
</span></p>
<br>
%= submit_button $c->l('PERFORM'), class => 'action'
% end
<br>
%= submit_button $c->l('PERFORM'), class => 'action'
</div>
% end
% end
</div>
% end

View File

@@ -2,81 +2,81 @@
% content_for 'module' => begin
<div id='module' class='module bugreport-panel'>
<div id='module' class='module bugreport-panel'>
% if (config->{debug} == 1) {
<p>
(DBG)route: <%= $c->current_route %><br>
(DBG)trt: <%= $bugr_datas->{trt} %><br>
</p>
<p>
(DBG)route: <%= $c->current_route %><br>
(DBG)trt: <%= $bugr_datas->{trt} %><br>
</p>
% }
<h1><%= $title %></h1>
<!--br><%= $modul %><br-->
<h1><%= $title %></h1>
<!--br><%= $modul %><br-->
<b>
%=l ('bugr_DO_NOT_PANIC')
%= l('bugr_DO_NOT_PANIC')
</b>
<p>
%=l ('bugr_SME_EXPERIENCE')
%= l('bugr_SME_EXPERIENCE')
</p><p>
%=l ('bugr_USE_TEMPLATE')
: <a href="https://wiki.koozali.org/Bugzilla_Help#Reporting_Bugs"
target="_blank">https://wiki.koozali.org/Bugzilla_Help#Reporting_Bugs</a>.
</p><p>
%=l ('bugr_PLEASE_REPORT_HERE')
: <a href="https://bugs.koozali.org" target="_blank">https://bugs.koozali.org</a>.
</p><p>
%=l ('bugr_FOLLOWING_REPORT_MIGHT_HELP')
</p><p>
%=l ('bugr_REPORT_CONTENT')
%= l('bugr_USE_TEMPLATE')
: <a href="https://wiki.koozali.org/Bugzilla_Help#Reporting_Bugs"
target="_blank">https://wiki.koozali.org/Bugzilla_Help#Reporting_Bugs</a>.
</p><p>
%= l('bugr_PLEASE_REPORT_HERE')
: <a href="https://bugs.koozali.org" target="_blank">https://bugs.koozali.org</a>.
</p><p>
%= l('bugr_FOLLOWING_REPORT_MIGHT_HELP')
</p><p>
%= l('bugr_REPORT_CONTENT')
<br><ul><li>
%=l ('bugr_SME_VERSION')
</li><li>
%=l ('bugr_SERVER_MODE')
</li><li>
%=l ('bugr_PREVIOUS_SERVER_MODE')
</li><li>
%=l ('bugr_KERNEL_AND_ARCH')
</li><li>
%=l ('bugr_INSTALLED_RPMS')
</li><li>
%=l ('bugr_ALTERED_TEMPLATES')
</li><li>
%=l ('bugr_ALTERED_EVENTS')
</li><li>
%=l ('bugr_YUM_REPOS')
</li><br></ul>
%=l ('bugr_PRIVACY')
</p>
%= l('bugr_SME_VERSION')
</li><li>
%= l('bugr_SERVER_MODE')
</li><li>
%= l('bugr_PREVIOUS_SERVER_MODE')
</li><li>
%= l('bugr_KERNEL_AND_ARCH')
</li><li>
%= l('bugr_INSTALLED_RPMS')
</li><li>
%= l('bugr_ALTERED_TEMPLATES')
</li><li>
%= l('bugr_ALTERED_EVENTS')
</li><li>
%= l('bugr_YUM_REPOS')
</li><br></ul>
%= l('bugr_PRIVACY')
</p>
<% my $btn = l('bugr_CREATE_REPORT'); %>
<% my $btn = l('bugr_CREATE_REPORT'); %>
%= form_for 'bugreport' => (method => 'POST') => begin
%= submit_button "$btn", class => 'action'
% end
%= form_for 'bugreport' => ( method => 'POST' ) => begin
%= submit_button "$btn", class => 'action'
% end
<p><b>
%=l ('bugr_DONATING')
<p><b>
%= l('bugr_DONATING')
</b><br><br>
%=l ('bugr_AWARE_SME')
%= l('bugr_AWARE_SME')
<br><br><b>
%=l ('bugr_YOUR_HELP')
%= l('bugr_YOUR_HELP')
</b><br><br>
%=l ('bugr_CONSIDER_DONATING')
%= l('bugr_CONSIDER_DONATING')
<br><br>
</p>
</p>
%= link_to 'https://wiki.koozali.org/Donate' => begin
%= image '/images/btn_donateCC_LG.gif'
%= link_to 'https://wiki.koozali.org/Donate' => begin
%= image '/images/btn_donateCC_LG.gif'
%= hidden_field 'trt' => $bugr_datas->{trt}
% end
% end
<br>
%=l ('bugr_THANK_YOU')
<br>
%= l('bugr_THANK_YOU')
</div>
%end
% end

View File

@@ -2,33 +2,33 @@
% content_for 'module' => begin
<div id='module' class='module bugreport2-panel'>
<div id='module' class='module bugreport2-panel'>
% if (config->{debug} == 1) {
<p>
(DBG)route: <%= $c->current_route %><br>
(DBG)trt: <%= $bugr_datas->{trt} %><br>
</p>
<p>
(DBG)route: <%= $c->current_route %><br>
(DBG)trt: <%= $bugr_datas->{trt} %><br>
</p>
% }
<h1><%= $title %></h1>
<h1><%= $title %></h1>
<br><%= $modul %><br>
<br><%= $modul %><br>
<% my $btn = l('bugr_Download this report'); %>
<% my $btn = l('bugr_Download this report'); %>
%= form_for 'bugreportD' => (method => 'POST') => begin
%= submit_button "$btn", class => 'action'
%= hidden_field 'trt' => $bugr_datas->{trt}
% end
% my $out = "================== <br />";
% $out .= "Boot anaysis image (right click and save image to download)<br />";
% $out .= "================== <br />";
% $out .= "<img src='images/boot.svg' alt='boot timing image' width=95% >";
<br><%= $c->render_to_string(inline=>$out) %><br>
%= form_for 'bugreportD' => ( method => 'POST' ) => begin
%= submit_button "$btn", class => 'action'
%= hidden_field 'trt' => $bugr_datas->{trt}
% end
% my $out = "================== <br />";
% $out .= "Boot anaysis image (right click and save image to download)<br />";
% $out .= "================== <br />";
% $out .= "<img src='images/boot.svg' alt='boot timing image' width=95% >";
<br><%= $c->render_to_string( inline => $out ) %><br>
</div>
%end
% end

View File

@@ -1,45 +1,45 @@
% layout 'default', title => "Sme server 2 - clamav";
% content_for 'module' => begin
<div id='module' class='module clamav-panel'>
%if (config->{debug} == 1) {
<p>(DBG)route: <%= $c->current_route %><br>
(DBG)FsS stat: <%= $clm_datas->{FilesystemScan}%> <br>
(DBG)Quar stat: <%=$clm_datas->{Quarantine} %>
</p>
%}
<h1><%= $title %></h1>
<br>
<%= $modul %>
<% my $btn = l('SAVE'); %>
<div id='module' class='module clamav-panel'>
% if (config->{debug} == 1) {
<p>(DBG)route: <%= $c->current_route %><br>
(DBG)FsS stat: <%= $clm_datas->{FilesystemScan} %> <br>
(DBG)Quar stat: <%= $clm_datas->{Quarantine} %>
</p>
% }
<h1><%= $title %></h1>
<br>
<%= $modul %>
<% my $btn = l('SAVE'); %>
%= form_for 'clamav' => (method => 'POST') => begin
<p>
<span class=label>
%=l 'clm_LABEL_FILESYSTEM_SCAN_PERIOD'
</span><span class=data>
% param 'FilesystemScan' => $clm_datas->{FilesystemScan} unless param 'FilesystemScan';
%= select_field 'FilesystemScan' => [[ (l 'clm_DAILY') => 'daily'], [ (l 'clm_NEVER') => 'disabled'], [ (l 'clm_WEEKLY') => 'weekly']], class => 'input'
</span>
</p>
<p>
<span class=label>
%=l 'clm_LABEL_QUARANTINE'
</span><span class=data>
% param 'Quarantine' => $clm_datas->{Quarantine} unless param 'Quarantine';
%= select_field 'Quarantine' => [[ (l 'ENABLED') => 'enabled'], [ (l 'DISABLED') => 'disabled']], class => 'input'
<br>
</span>
</p>
<p>
<span class=label>
%=l 'clm_LABEL_CLAM_VERSIONS'
</span><span class=data>
%= $clm_datas->{clam_versions}
<br>
</span>
</p>
%= submit_button "$btn", class => 'action'
% end
%= form_for 'clamav' => ( method => 'POST' ) => begin
<p>
<span class=label>
%= l 'clm_LABEL_FILESYSTEM_SCAN_PERIOD'
</span><span class=data>
% param 'FilesystemScan' => $clm_datas->{FilesystemScan} unless param 'FilesystemScan';
%= select_field 'FilesystemScan' => [ [ ( l 'clm_DAILY' ) => 'daily' ], [ ( l 'clm_NEVER' ) => 'disabled' ], [ ( l 'clm_WEEKLY' ) => 'weekly' ] ], class => 'input';
</span>
</p>
<p>
<span class=label>
%= l 'clm_LABEL_QUARANTINE'
</span><span class=data>
% param 'Quarantine' => $clm_datas->{Quarantine} unless param 'Quarantine';
%= select_field 'Quarantine' => [ [ ( l 'ENABLED' ) => 'enabled' ], [ ( l 'DISABLED' ) => 'disabled' ] ], class => 'input';
<br>
</span>
</p>
<p>
<span class=label>
%= l 'clm_LABEL_CLAM_VERSIONS'
</span><span class=data>
%= $clm_datas->{clam_versions}
<br>
</span>
</p>
%= submit_button "$btn", class => 'action'
% end
</div>
%end
% end

View File

@@ -1,10 +1,10 @@
% layout 'default', title => "Sme server 2 - err 400";
% content_for 'module' => begin
<div id='module' class='module csrf_400-panel'>
<div id='module' class='module csrf_400-panel'>
<div class=sme-error>
%= l 'CSRF_VALIDATION_FAILURE'
%= l 'CSRF_VALIDATION_FAILURE'
</div>
</div>
</div>
% end

View File

@@ -1,139 +1,147 @@
% layout 'default', title => 'Sme server 2 - datetime';
% content_for 'module' => begin
%= javascript 'js/datetime.js'
%= stylesheet 'css/datetime.css'
<div id='module' class='module datetime-panel'>
% if (config->{debug} == 1) {
<p>
%= dumper $c->current_route
%= dumper $dat_data
</p>
% }
<div id='module' class='module datetime-panel'>
% if (config->{debug} == 1) {
<p>
%= dumper $c->current_route
%= dumper $dat_data
</p>
% }
%if ($c->stash('first')) {
<br><p>
%=$c->render_to_string(inline =>$c->l($c->stash('first')))
</p>
%} elsif ($c->stash('success')) {
<div class='success '>
%= $c->l($c->stash('success'));
</div>
%} elsif ($c->stash('error')) {
<div class='sme-error'>
%= $c->l($c->stash('error'));
</div>
%}
% if ($c->stash('first')) {
<br><p>
%= $c->render_to_string( inline => $c->l( $c->stash('first') ) )
</p>
% } elsif ($c->stash('success')) {
<div class='success '>
%= $c->l( $c->stash('success') );
</div>
% } elsif ($c->stash('error')) {
<div class='sme-error'>
%= $c->l( $c->stash('error') );
</div>
% }
<h1><%= $title %></h1><br>
%= $modul
<% my $btn = l('SAVE'); %>
<p>
% if ($dat_data->{ntpstatus} eq 'disabled') {
<div class='datetime-set-ntp'>
%=l 'dat_NTP_ENABLE_DESC'
<br>
</div>
% } else {
% my $current_year = $dat_data->{year};
% my $year_options = [ map { [ $_, $_ ] } ($current_year..($current_year+30)) ];
% my $month_options = [ map { [ sprintf('%02d', $_), sprintf('%02d', $_) ] } (1..12) ];
% my $hour_options = [ map { [ sprintf('%02d', $_), sprintf('%02d', $_) ] } (0..23) ];
% my $mode_options = [
% [ $c->l('dat_ntp_server'), 'dat_ntp_server' ],
% [ $c->l('dat_manually_set'), 'dat_manually_set' ]
% ];
<h2><%= $c->l('Time Configuration') %></h2>
%= form_for "datetimeu" => (method => 'post') => begin
<h1><%= $title %></h1><br>
%= $modul
<% my $btn = l('SAVE'); %>
<br /><br />
<span>
%= label_for 'real-time-clock' => $c->l('dat_The_time_is_currently'), class => 'datetime-clock-label';
</span><span class=data2>
<!--
<div id="real-time-clock"></div>
-->
%= text_field 'clock', id => 'real-time-clock', readonly => 'readonly', class => 'datetime-clock', value => $dat_data->{currentdatetime};
</span>
% if ($dat_data->{ntpstatus} eq 'disabled') {
<div class='datetime-set-ntp'>
%= l 'dat_NTP_ENABLE_DESC'
<br>
</div>
% } else {
% my $current_year = $dat_data->{year};
% my $year_options = [ map { [ $_, $_ ] } ( $current_year .. ( $current_year + 30 ) ) ];
% my $month_options = [ map { [ sprintf( '%02d', $_ ), sprintf( '%02d', $_ ) ] } ( 1 .. 12 ) ];
% my $hour_options = [ map { [ sprintf( '%02d', $_ ), sprintf( '%02d', $_ ) ] } ( 0 .. 23 ) ];
% my $mode_options = [
% [ $c->l('dat_ntp_server'), 'dat_ntp_server' ],
% [ $c->l('dat_manually_set'), 'dat_manually_set' ]
% ];
<h2><%= $c->l('Time Configuration') %></h2>
%= form_for "datetimeu" => ( method => 'post' ) => begin
%= hidden_field 'Old_ntpstatus' => $dat_data->{ntpstatus};
%= hidden_field 'trt' => $dat_data->{trt};
%= hidden_field 'Old_ntpstatus' => $dat_data->{ntpstatus};
%= hidden_field 'trt' => $dat_data->{trt};
<span class=label>
%= label_for time_mode => $c->l('Time Setting Mode:')
</span><span class=data2>
% param 'time_mode' => $dat_data->{time_mode} unless param 'time_mode';
%= select_field time_mode => ($mode_options, id => 'time_mode_select')
</span>
<span class=label>
%= label_for time_mode => $c->l('Time Setting Mode:')
</span><span class=data2>
% param 'time_mode' => $dat_data->{time_mode} unless param 'time_mode';
%= select_field time_mode => ( $mode_options, id => 'time_mode_select' )
</span>
<div id='ntp_section'>
<p>
%= $c->l('dat_NTP_CONFIGURE_DESC')
</p>
<div class='datetime-config-row'>
<div class='datetime-label-col'>
<span class='datetime-label'>
%= label_for ntpserver => $c->l('dat_NTP_Server_URL')
</span>
</div>
<div class=datetime-fields-col>
% my $server_check = '^([a-zA-Z0-9][a-zA-Z0-9\.\-]{0,253}[a-zA-Z0-9]|(\d{1,3}\.){3}\d{1,3})$';
% param 'ntpserver' => $dat_data->{ntpserver} unless param 'ntpserver';
%= text_field ntpserver => placeholder => 'e.g. smeserver.pool.ntp.org',id => 'ntpserver', pattern => $server_check, title => 'Enter a valid hostname or IPv4 address',required => 'required'
</div>
</div>
</div>
<div id='ntp_section'>
<p>
%= $c->l('dat_NTP_CONFIGURE_DESC')
</p>
<div class='datetime-config-row'>
<div class='datetime-label-col'>
<span class='datetime-label'>
%= label_for ntpserver => $c->l('dat_NTP_Server_URL')
</span>
</div>
<div class=datetime-fields-col>
% my $server_check = '^([a-zA-Z0-9][a-zA-Z0-9\.\-]{0,253}[a-zA-Z0-9]|(\d{1,3}\.){3}\d{1,3})$';
% param 'ntpserver' => $dat_data->{ntpserver} unless param 'ntpserver';
%= text_field ntpserver => placeholder => 'e.g. smeserver.pool.ntp.org', id => 'ntpserver', pattern => $server_check, title => 'Enter a valid hostname or IPv4 address', required => 'required';
<button type="button" id="test-ntp-btn" class="btn btn-primary ml-2">Test Server</button>
<span id="ntp-test-result" class="ntp-test-result ml-2"></span>
</div>
</div>
</div>
<div id='manual_section'>
<p>
%= $c->l('dat_NTP_DISABLE_DESC')
</p>
<div class='datetime-config-row'>
<div class='datetime-label-col'>
<span class='datetime-label'>
%= label_for 'datetime_manual' => $c->l('dat_set_manually')
</span>
</div>
<div class='datetime-fields-col' id='datetime_manual'>
<fieldset>
<legend><%= $c->l('Date') %></legend>
%= label_for year => $c->l('Year:')
% param 'year' => ($dat_data->{year}) unless param 'year';
%= select_field year => ($year_options, id => 'year'), required => 'required'
&nbsp;
<div id='manual_section'>
<p>
%= $c->l('dat_NTP_DISABLE_DESC')
</p>
<div class='datetime-config-row'>
<div class='datetime-label-col'>
<span class='datetime-label'>
%= label_for 'datetime_manual' => $c->l('dat_set_manually')
</span>
</div>
<div class='datetime-fields-col' id='datetime_manual'>
<fieldset>
<legend><%= $c->l('Date') %></legend>
%= label_for year => $c->l('Year:')
% param 'year' => ( $dat_data->{year} ) unless param 'year';
%= select_field year => ( $year_options, id => 'year' ), required => 'required'
&nbsp;
%= label_for month => $c->l('Month:')
% param 'month' => ($dat_data->{month}) unless param 'month';
%= select_field month => ($month_options, id => 'month'), required => 'required'
&nbsp;
%= label_for month => $c->l('Month:')
% param 'month' => ( $dat_data->{month} ) unless param 'month';
%= select_field month => ( $month_options, id => 'month' ), required => 'required'
&nbsp;
%= label_for day => $c->l('Day:')
% param 'day' => ($dat_data->{day}) unless param 'day';
%= text_field day => id => 'day', size => 2, maxlength => 2, placeholder => 'DD', pattern => '^(0[1-9]|[12][0-9]|3[01])$', title => 'Day (01-31)', required => 'required', inputmode => 'numeric', autocomplete => 'off'
</fieldset>
<fieldset>
<legend><%= $c->l('Time') %></legend>
%= label_for hour => $c->l('Hour:')
% param 'hour' => ($dat_data->{hour}) unless param 'hour';
%= select_field hour => ($hour_options, id => 'hour'), required => 'required'
&nbsp;
%= label_for day => $c->l('Day:')
% param 'day' => ( $dat_data->{day} ) unless param 'day';
%= text_field day => id => 'day', size => 2, maxlength => 2, placeholder => 'DD', pattern => '^(0[1-9]|[12][0-9]|3[01])$', title => 'Day (01-31)', required => 'required', inputmode => 'numeric', autocomplete => 'off';
</fieldset>
%= label_for minute => $c->l('Minute:')
% param 'minute' => ($dat_data->{minute}) unless param 'minute';
%= text_field minute => id => 'minute', size => 2, maxlength => 2, placeholder => 'MM', pattern => '^[0-5][0-9]$', title => 'Minute (00-59)', required => 'required', inputmode => 'numeric', autocomplete => 'off'
&nbsp;
<fieldset>
<legend><%= $c->l('Time') %></legend>
%= label_for hour => $c->l('Hour:')
% param 'hour' => ( $dat_data->{hour} ) unless param 'hour';
%= select_field hour => ( $hour_options, id => 'hour' ), required => 'required'
&nbsp;
%= label_for second => $c->l('Second:')
% param 'second' => ($dat_data->{second}) unless param 'second';
%= text_field second => id => 'second', size => 2, maxlength => 2, placeholder => 'SS', pattern => '^[0-5][0-9]$', title => 'Second (00-59)', required => 'required', inputmode => 'numeric', autocomplete => 'off'
</fieldset>
</div>
</div>
<div class='datetime-config-row'>
<div class='datetime-label-col'>
<span class='datetime-label'>
%=l 'dat_TZ'
</span>
</div>
<div class='datetime-fields-col' id='datetime_manual'>
% param 'Timezone' => $c->getTimezone() unless param 'Timezone';
%= select_field 'Timezone' => $c->getZone_list(), class => 'input'
</div>
</div>
</div>
%= submit_button $btn, class => 'action'
% end
% }
</div>
%= label_for minute => $c->l('Minute:')
% param 'minute' => ( $dat_data->{minute} ) unless param 'minute';
%= text_field minute => id => 'minute', size => 2, maxlength => 2, placeholder => 'MM', pattern => '^[0-5][0-9]$', title => 'Minute (00-59)', required => 'required', inputmode => 'numeric', autocomplete => 'off';
&nbsp;
%= label_for second => $c->l('Second:')
% param 'second' => ( $dat_data->{second} ) unless param 'second';
%= text_field second => id => 'second', size => 2, maxlength => 2, placeholder => 'SS', pattern => '^[0-5][0-9]$', title => 'Second (00-59)', required => 'required', inputmode => 'numeric', autocomplete => 'off';
</fieldset>
</div>
</div>
<div class='datetime-config-row'>
<div class='datetime-label-col'>
<span class='datetime-label'>
%= l 'dat_TZ'
</span>
</div>
<div class='datetime-fields-col' id='datetime_manual'>
% param 'Timezone' => $c->getTimezone() unless param 'Timezone';
%= select_field 'Timezone' => $c->getZone_list(), class => 'input'
</div>
</div>
</div>
%= submit_button $btn, class => 'action'
% end
% }
</div>
% end
1;
1;

View File

@@ -2,12 +2,12 @@
% content_for 'module' => begin
<div id='module' class='module default-panel'>
<div id='module' class='module default-panel'>
<p><%= $title %></p>
<%= $modul %>
<p>
%= link_to Initial => '/'
%= link_to Initial => '/'
</p>
</div>
</div>
%end
% end

View File

@@ -1,88 +1,87 @@
% layout 'default', title => "Sme server 2 - directory";
% content_for 'module' => begin
<div id='module' class='module directory-panel'>
<div id='module' class='module directory-panel'>
%if (config->{debug} == 1) {
<p>
(DBG)route: <%= $c->current_route %><br>
(DBG)dir. access: <%= $dir_datas->{access}%><br>
</p>
%}
<h1><%= $title %></h1>
% if (config->{debug} == 1) {
<p>
(DBG)route: <%= $c->current_route %><br>
(DBG)dir. access: <%= $dir_datas->{access} %><br>
</p>
% }
<h1><%= $title %></h1>
<br>
<%= $modul %>
<% my $btn = l('SAVE'); %>
%= form_for 'directory' => ( method => 'POST' ) => begin
<br>
<%= $modul %>
<% my $btn = l('SAVE');
%>
%= form_for 'directory' => (method => 'POST') => begin
<br>
<p>
<span class=label>
%= l('dir_LABEL_ROOT'), class => 'label'
</span> <span class=data>
%= $dir_datas->{root}, class => 'data'
</span>
</p>
<p>
%=l 'dir_DESC_DIRECTORY_ACCESS', class => 'desc'
<br>
<span class=label>
%=l 'dir_DIRECTORY_ACCESS', class => 'label'
</span><span class=data>
% param 'access' => $dir_datas->{access} unless param 'access';
%= select_field 'access' => [[ (l 'NETWORKS_ALLOW_LOCAL') => 'private'], [ (l 'NETWORKS_ALLOW_PUBLIC') => 'public']], class => 'input', id => 'access'
</span>
</p>
<p>
%=l 'dir_DESC_DEPARTMENT', class => 'desc'
<br><br>
<span class=label>
%=l 'dir_DEPARTMENT', class => 'label'
</span><span class=data>
%= text_field 'department' => $dir_datas->{department}, class => 'input'
</span>
</p><p>
<span class=label>
%=l 'dir_COMPANY', class => 'label'
</span><span class=data>
%= text_field 'company', $dir_datas->{company}, class => 'input'
</span>
</p><p>
<span class=label>
%=l 'dir_STREET', class => 'label'
</span><span class=data>
%= text_field 'street' => $dir_datas->{street}, class => 'input'
</span>
</p><p>
<span class=label>
%=l 'dir_CITY', class => 'label'
</span><span class=data>
%= text_field 'city', $dir_datas->{city}, class => 'input'
</span>
</p><p>
<span class=label>
%=l 'dir_PHONENUMBER', class => 'label'
</span><span class=data>
%= text_field 'phonenumber', $dir_datas->{phonenumber}, class => 'input'
</span>
</p>
<p>
%=l 'dir_DESC_EXISTING', class => 'desc'
<br><br>
<span class=label>
%=l 'dir_EXISTING', class => 'label'
</span><span class=data>
%= select_field 'existing'=> [[ (l 'dir_LEAVE') => 'leave'], [ (l 'dir_UPDATE') => 'update' ]], class => 'input'
</span>
</p>
<p>
<br>
%= submit_button "$btn", class => 'action'
</p>
% end
<p>
<span class=label>
%= l('dir_LABEL_ROOT'), class => 'label'
</span> <span class=data>
%= $dir_datas->{root}, class => 'data'
</span>
</p>
<p>
%= l 'dir_DESC_DIRECTORY_ACCESS', class => 'desc'
<br>
<span class=label>
%= l 'dir_DIRECTORY_ACCESS', class => 'label'
</span><span class=data>
% param 'access' => $dir_datas->{access} unless param 'access';
%= select_field 'access' => [ [ ( l 'NETWORKS_ALLOW_LOCAL' ) => 'private' ], [ ( l 'NETWORKS_ALLOW_PUBLIC' ) => 'public' ] ], class => 'input', id => 'access';
</span>
</p>
<p>
%= l 'dir_DESC_DEPARTMENT', class => 'desc'
<br><br>
<span class=label>
%= l 'dir_DEPARTMENT', class => 'label'
</span><span class=data>
%= text_field 'department' => $dir_datas->{department}, class => 'input'
</span>
</p><p>
<span class=label>
%= l 'dir_COMPANY', class => 'label'
</span><span class=data>
%= text_field 'company', $dir_datas->{company}, class => 'input'
</span>
</p><p>
<span class=label>
%= l 'dir_STREET', class => 'label'
</span><span class=data>
%= text_field 'street' => $dir_datas->{street}, class => 'input'
</span>
</p><p>
<span class=label>
%= l 'dir_CITY', class => 'label'
</span><span class=data>
%= text_field 'city', $dir_datas->{city}, class => 'input'
</span>
</p><p>
<span class=label>
%= l 'dir_PHONENUMBER', class => 'label'
</span><span class=data>
%= text_field 'phonenumber', $dir_datas->{phonenumber}, class => 'input'
</span>
</p>
<p>
%= l 'dir_DESC_EXISTING', class => 'desc'
<br><br>
<span class=label>
%= l 'dir_EXISTING', class => 'label'
</span><span class=data>
%= select_field 'existing' => [ [ ( l 'dir_LEAVE' ) => 'leave' ], [ ( l 'dir_UPDATE' ) => 'update' ] ], class => 'input';
</span>
</p>
<p>
<br>
%= submit_button "$btn", class => 'action'
</p>
% end
</div>
%end
% end

View File

@@ -1,32 +1,32 @@
% layout 'default', title => "Sme server 2 - domains";
% content_for 'module' => begin
<div id='module' class='module domains-panel'>
<div id='module' class='module domains-panel'>
% if (config->{debug} == 1) {
<p>
%= dumper $c->current_route
%= dumper $dom_datas
</p>
<p>
%= dumper $c->current_route
%= dumper $dom_datas
</p>
% }
% if ( stash 'error' ) {
<br><div class=sme-error>
%= $c->render_to_string(inline => stash 'error')
</div>
%}
<h1><%= $title%></h1>
% if ( stash 'error' ) {
<br><div class=sme-error>
%= $c->render_to_string( inline => stash 'error' )
</div>
% }
% if ($dom_datas->{trt} eq 'ADD' or $dom_datas->{trt} eq 'UPD') {
%= include 'partials/_dom_upd'
%} elsif ($dom_datas->{trt} eq 'DEL') {
%= include 'partials/_dom_del'
%} elsif ($dom_datas->{trt} eq 'UP2') {
%= include 'partials/_dom_up2'
%} else {
%= include 'partials/_dom_list'
%}
<h1><%= $title %></h1>
% if ($dom_datas->{trt} eq 'ADD' or $dom_datas->{trt} eq 'UPD') {
%= include 'partials/_dom_upd'
% } elsif ($dom_datas->{trt} eq 'DEL') {
%= include 'partials/_dom_del'
% } elsif ($dom_datas->{trt} eq 'UP2') {
%= include 'partials/_dom_up2'
% } else {
%= include 'partials/_dom_list'
% }
</div>
%end
% end

View File

@@ -1,57 +0,0 @@
% layout 'default', title => "Sme server 2 - emailaccess";
% content_for 'module' => begin
<div id='module' class='module emailaccess-panel'>
% if (config->{debug} == 1) {
<p>
%= dumper $c->current_route
%= dumper $mai_datas
</p>
% }
% if ( stash 'error' ) {
<br><div class=sme-error>
%= $c->render_to_string(inline => stash 'error')
</div>
%}
<h1><%= $title%></h1>
%= form_for '/emailsettingd' => (method => 'POST') => begin
%=l 'mai_DESC_POP_ACCESS_CONTROL'
<p><span class=label>
%=l 'mai_LABEL_POP_ACCESS_CONTROL'
</span><span class=input>
% param 'POPAccess' => $c->get_current_pop3_access() unless param 'POPAccess';
%= select_field 'POPAccess' => $c->get_pop_opt(), class => 'input'
</span></p>
%=l 'mai_DESC_IMAP_ACCESS_CONTROL'
<p><span class=label>
%=l 'mai_LABEL_IMAP_ACCESS_CONTROL'
</span><span class=input>
% param 'IMAPAccess' => $c->get_current_imap_access() unless param 'IMAPAccess';
%= select_field 'IMAPAccess' => $c->get_imap_opt(), class => 'input'
</span></p>
%=l 'mai_DESC_WEBMAIL'
<p><span class=label>
%=l 'mai_LABEL_WEBMAIL'
</span><span class=input>
% param 'WebMail' => $c->get_current_webmail_status() unless param 'WebMail';
%= select_field 'WebMail' => $c->get_webmail_opt(), class => 'input'
</span></p>
% my $btn = l('SAVE');
%= submit_button "$btn", class => 'action'
%= hidden_field 'trt' => 'ACC'
% end
</div>
%end

View File

@@ -1,92 +0,0 @@
% layout 'default', title => "Sme server 2 - emaildeliver";
% content_for 'module' => begin
<div id='module' class='module emaildeliver-panel'>
% if (config->{debug} == 1) {
<p>
%= dumper $c->current_route
%= dumper $mai_datas
</p>
% }
% if ( stash 'error' ) {
<br><div class=sme-error>
%= $c->render_to_string(inline => stash 'error')
</div>
%}
<h1><%= $title%></h1>
%= form_for '/emailsettingd' => (method => 'POST') => begin
<h2>
%=l 'mai_TITLE_UNKNOWN'
</h2>
%=l 'mai_DESC_UNKNOWN'
<p><span class=label>
%=l 'mai_LABEL_UNKNOWN'
</span><span class=input>
% param 'EmailUnknownUser' => $mai_datas->{emailunknownuser} unless param 'EmailUnknownUser';
%= select_field 'EmailUnknownUser' => $c->get_emailunknownuser_opt(), class => 'input'
</span></p>
<!--<hr class='menubar' />-->
<h2>
%=l 'mai_TITLE_DELEGATE'
</h2>
%=l 'mai_DESC_DELEGATE'
<p><span class=label>
%=l 'mai_LABEL_DELEGATE'
</span><span class=input>
% param 'DelegateMailServer' => $mai_datas->{delegatemailserver} unless param 'DelegateMailServer';
%= text_field 'DelegateMailServer', class => 'input'
</span></p>
<!--<hr class='sectionbar' />-->
<h2>
%=l 'mai_TITLE_SMARTHOST'
</h2>
%=l 'mai_DESC_SMARTHOST'
<p><span class=label>
%=l 'mai_LABEL_SMARTHOST'
</span><span class=input>
% param 'SMTPSmartHost' => $mai_datas->{smtpsmarthost} unless param 'SMTPSmartHost';
%= text_field 'SMTPSmartHost', class => 'input'
</span></p>
<p><span class=label>
%=l 'mai_LABEL_SMARTHOST_SMTPAUTH_STATUS'
</span><span class=input>
% param 'SMTPAUTHPROXY_status' => $mai_datas->{smtpauthproxystatus} unless param 'SMTPAUTHPROXY_status';
%= select_field 'SMTPAUTHPROXY_status' => [[(l 'DISABLED') => 'disabled'], [(l 'ENABLED') => 'enabled']], class => 'input'
</span></p>
<p><span class=label>
%=l 'mai_LABEL_SMARTHOST_SMTPAUTH_USERID'
</span><span class=input>
% param 'SMTPAUTHPROXY_Userid' => $mai_datas->{smtpauthproxyuserid} unless param 'SMTPAUTHPROXY_Userid';
%= text_field 'SMTPAUTHPROXY_Userid', class => 'input'
</span></p>
<p><span class=label>
%=l 'mai_LABEL_SMARTHOST_SMTPAUTH_PASSWD'
</span><span class=input>
% param 'SMTPAUTHPROXY_Passwd' => $mai_datas->{smtpauthproxypassword} unless param 'SMTPAUTHPROXY_Passwd';
%= password_field 'SMTPAUTHPROXY_Passwd', class => 'input'
</span></p>
% my $btn = l('SAVE');
%= submit_button "$btn", class => 'action'
%= hidden_field 'trt' => 'DEL'
% end
</div>
%end

View File

@@ -1,101 +0,0 @@
% layout 'default', title => "Sme server 2 - emailfilter";
% content_for 'module' => begin
<div id='module' class='module emailfilter-panel'>
% if (config->{debug} == 1) {
<p>
%= dumper $c->current_route
%= dumper $mai_datas
</p>
% }
% if ( stash 'error' ) {
<br><div class=sme-error>
%= $c->render_to_string(inline => stash 'error')
</div>
%}
<h1><%= $title%></h1>
%= form_for '/emailsettingd' => (method => 'POST') => begin
%=l 'mai_DESC_VIRUS_SCAN'
<p><span class=label>
%=l 'mai_LABEL_VIRUS_SCAN'
</span><span class=input>
% param 'VirusStatus' => $mai_datas->{virusstatus} unless param 'VirusStatus';
%= select_field 'VirusStatus' => [[(l 'DISABLED') => 'disabled'], [ (l 'ENABLED') => 'enabled']], class => 'input'
</span><br></p>
%=l 'mai_DESC_SPAM_SCAN'
<p><span class=label>
%=l 'mai_LABEL_SPAM_SCAN'
</span><span class=input>
% param 'Spamstatus' => $mai_datas->{spamstatus} unless param 'Spamstatus';
%= select_field 'Spamstatus' => [[(l 'DISABLED') => 'disabled'], [ (l 'ENABLED') => 'enabled']], class => 'input'
</span></p>
<p><span class=label>
%=l 'mai_LABEL_SPAM_SENSITIVITY'
</span><span class=input>
% param 'SpamSensitivity' => $mai_datas->{spamsensitivity} unless param 'SpamSensitivity';
%= select_field 'SpamSensitivity' => $c->get_spam_sensitivity_opt(), class => 'input'
</span></p>
<p><span class=label>
%=l 'mai_LABEL_SPAM_TAGLEVEL'
</span><span class=input>
% param 'SpamTagLevel' => $mai_datas->{spamtaglevel} unless param 'SpamTagLevel';
%= select_field 'SpamTagLevel' => $c->get_spam_level_options(), class => 'input'
</span></p>
<p><span class=label>
%=l 'mai_LABEL_SPAM_REJECTLEVEL'
</span><span class=input>
% param 'SpamRejectLevel' => $mai_datas->{spamrejectlevel} unless param 'SpamRejectLevel';
%= select_field 'SpamRejectLevel' => $c->get_spam_level_options(), class => 'input'
</span></p>
<p><span class=label>
%=l 'mai_LABEL_SORTSPAM'
</span><span class=input>
% param 'SpamSortSpam' => $mai_datas->{spamsortspam} unless param 'SpamSortSpam';
%= select_field 'SpamSortSpam' => [[(l 'DISABLED') => 'disabled'], [ (l 'ENABLED') => 'enabled']], class => 'input'
</span></p>
%=l 'mai_DESC_SPAM_SUBJECT'
<p><span class=label>
%=l 'mai_LABEL_SPAM_SUBJECTTAG'
</span><span class=input>
% param 'SpamSubjectTag' => $mai_datas->{spamsubjecttag} unless param 'SpamSubjectTag';
%= select_field 'SpamSubjectTag' => [[(l 'DISABLED') => 'disabled'], [ (l 'ENABLED') => 'enabled']], class => 'input'
</span></p>
<p><span class=label>
%=l 'mai_LABEL_SPAM_SUBJECT'
</span><span class=input>
% param 'SpamSubject' => $mai_datas->{spamsubject} unless param 'SpamSubject';
%= text_field 'SpamSubject' => class => 'input'
</span></p>
%=l 'mai_DESC_BLOCK_EXECUTABLE_CONTENT'
<p><span class=label>
%=l 'mai_LABEL_CONTENT_TO_BLOCK'
</span><span class=input>
% param 'BlockExecutableContent' => $c->get_patterns_current_opt() unless param 'BlockExecutableContent';
%= select_field 'BlockExecutableContent' => $c->get_patterns_opt(), class => 'input', multiple => "1"
</span></p>
% my $btn = l('SAVE');
%= submit_button "$btn", class => 'action'
%= hidden_field 'trt' => 'FIL'
% end
</div>
%end

View File

@@ -1,167 +0,0 @@
% layout 'default', title => "Sme server 2 - emailreceive";
% content_for 'module' => begin
% use constant FALSE => 0;
% use constant TRUE => 1;
<div id='module' class='module emailreceive-panel'>
% if (config->{debug} == 1) {
<p>
%= dumper $c->current_route
%= dumper $mai_datas
%= dumper $c->param('SMTPAuth')
</p>
% }
% if ( stash 'error' ) {
<br><div class=sme-error>
%= $c->render_to_string(inline => stash 'error')
</div>
%}
<h1><%= $title%></h1>
%= form_for '/emailsettingd' => (method => 'POST') => begin
%=l 'mai_DESC_MODE'
<p><span class=label>
%=l 'mai_LABEL_MODE'
</span><span class=input>
% param 'FetchmailMethod' => $mai_datas->{fetchmailmethod} unless param 'FetchmailMethod';
<!--
<pre>
%= dumper $mai_datas->{fetchmailmethod}
%= dumper $c->get_retrieval_opt()
%= param 'FetchmailMethod'
</pre>
-->
%= select_field 'FetchmailMethod' => $c->get_retrieval_opt(), class => 'input'
</span></p>
%#=l 'mai_DESC_SMTP_AUTH_CONTROL'
<br />
%= l "SMTP port (25) main purpose is to receive emails from another server, STARTTLS is always offered, but auth if offered is only if STARTTLS is also used by client."
<br />
%= l "SMTPS port (465) will require implicit SSL/TLS then authenticate to send."
<br />
%= l "SMTP Submission port (587) will require STARTTLS, then authenticate to send."
<br />
% my $smtp_mesg=l('SMTP port %u allow client to authenticate:');
<p><span class=label>
%= sprintf($smtp_mesg,$c->get_db_prop('qpsmtpd','TCPPort',25));
</span><span class=input>
% param 'SMTPAuth' => $c->get_current_smtp_auth( FALSE ) unless param 'SMTPAuth';
<!--
<pre>
%= dumper $c->get_smtp_auth_opt()
%= dumper $c->get_current_smtp_auth(FALSE)
%= dumper $c->get_db_prop("qpsmtpd","Authentication")
%= param 'SMTPAuth'
</pre>
-->
%= select_field 'SMTPAuth' => $c->get_smtp_auth_opt(), class => 'input'
</span></p>
% my $smtp_mesg=l('SMTPS SSL/TLS auth: port %u status:');
<p><span class=label>
%= sprintf($smtp_mesg,$c->get_db_prop('sqpsmtpd','TCPPort',465));
</span><span class=input>
% param 'sSMTPAuth' => $c->get_current_smtp_ssl_auth(FALSE,'s', TRUE) unless param 'sSMTPAuth';
%= select_field 'sSMTPAuth' => $c->get_smtp_ssl_auth_opt(), class => 'input'
</span></p>
%my $smtp_mesg=l('Submission port %u status:');
<p><span class=label>
%= sprintf($smtp_mesg,$c->get_db_prop('uqpsmtpd','TCPPort',587));
</span><span class=input>
% param 'uSMTPAuth' => $c->get_current_smtp_ssl_auth(FALSE,'u', TRUE) unless param 'uSMTPAuth';
<!--
<pre>
%= dumper $c->get_smtp_ssl_auth_opt()
%= dumper $c->get_current_smtp_ssl_auth(FALSE,'s', TRUE)
%= dumper $c->get_current_smtp_ssl_auth(FALSE,'u', TRUE)
%= dumper $c->get_db_prop("uqpsmtpd","access")
%= param 'uSMTPAuth'
</pre>
-->
%= select_field 'uSMTPAuth' => $c->get_smtp_ssl_auth_opt(), class => 'input'
</span></p>
<!--<hr class="sectionbar" />-->
<h2>
%=l 'mai_TITLE_SECONDARY'
</h2>
%=l 'mai_DESC_SECONDARY'
<p><span class=label>
%=l 'mai_LABEL_SECONDARY'
</span><span class=input>
% param 'SecondaryMailServer' => $mai_datas->{secondarymailserver} unless param 'SecondaryMailServer';
%= text_field 'SecondaryMailServer', class => 'input'
</span></p>
%=l 'mai_DESC_FETCH_PERIOD'
<p><span class=label>
%=l 'mai_LABEL_FETCH_PERIOD'
</span><span class=input>
% param 'FreqOffice' => $mai_datas->{freqoffice} unless param 'FreqOffice';
%= select_field 'FreqOffice' => $c->fetchmail_freq(), class => 'input'
</span></p>
<p><span class=label>
%=l 'mai_LABEL_FETCH_PERIOD_NIGHTS'
</span><span class=input>
% param 'FreqOutside' => $mai_datas->{freqoutside} unless param 'FreqOutside';
%= select_field 'FreqOutside' => $c->fetchmail_freq(), class => 'input'
</span></p>
<p><span class=label>
%=l 'mai_LABEL_FETCH_PERIOD_WEEKENDS'
</span><span class=input>
% param 'FreqWeekend' => $mai_datas->{freqweekend} unless param 'FreqWeekend';
%= select_field 'FreqWeekend' => $c->fetchmail_freq(), class => 'input'
</span></p>
<p><span class=label>
%=l 'mai_LABEL_POP_ACCOUNT'
</span><span class=input>
% param 'SecondaryMailAccount' => $mai_datas->{secondarymailaccount} unless param 'SecondaryMailAccount';
%= text_field 'SecondaryMailAccount', class => 'input'
</span></p>
<p><span class=label>
%=l 'mai_LABEL_POP_PASS'
</span><span class=input>
% param 'SecondaryMailPassword' => $mai_datas->{secondarymailpassword} unless param 'SecondaryMailPassword';
%= password_field 'SecondaryMailPassword', class => 'input'
</span></p>
<p><span class=label>
%=l 'mai_LABEL_SORT_METHOD'
</span><span class=input>
% param 'SpecifyHeader' => $mai_datas->{specifyheader} unless param 'SpecifyHeader';
%= select_field 'SpecifyHeader' => [[(l 'mai_DEFAULT') => 'off'], [(l 'mai_SPECIFY_BELOW') => 'on']], class => 'input'
</span></p>
<p><span class=label>
%=l 'mai_LABEL_SORT_HEADER'
</span><span class=input>
% param 'SecondaryMailEnvelope' => $mai_datas->{secondarymailenvelope} unless param 'SecondaryMailEnvelope';
%= text_field 'SecondaryMailEnvelope', class => 'input'
</span></p>
% my $btn = l('SAVE');
%= submit_button "$btn", class => 'action'
%= hidden_field 'trt' => 'REC'
% end
</div>
%end

View File

@@ -1,155 +1,70 @@
% layout 'default', title => "Sme server 2 - emailsettings";
%#
%# Generated by SM2Gen version:0.9(20Jan2025) Chameleon version:4.5.4 On Python:3.12.3 at 2025-06-29 08:53:20
%#
% layout 'default', title => "Sme server 2 - E-Mail", share_dir => './';
%# css specific to this panel:
% content_for 'module' => begin
% use constant FALSE => 0;
% use constant TRUE => 1;
% use constant FALSE => 0;
% use constant TRUE => 1;
<div id='module' class='module emailsettings-panel'>
<div id="module" class="module Emailsettings-panel">
% if (config->{debug} == TRUE) {
<p>
%= dumper $c->current_route
%= dumper $mai_datas
</p>
% if (config->{debug} == 1) {
<pre>
%= dumper $c->current_route
%= dumper $mai_data->{trt}
</pre>
% }
% if ( stash 'error' ) {
<br><div class=sme-error>
%= $c->render_to_string(inline => stash 'error')
</div>
%}
<h1><%= $title %></h1>
<h1><%= $title%></h1>
% if ( stash('modul')) {
%= $c->render_to_string( inline => stash('modul') );
% }
%= form_for 'emailsettings' => (method => 'POST') => begin
<p><span class=label>
%=l 'mai_LABEL_POP_ACCESS_CONTROL'
</span><span class=data2>
%= $c->get_current_pop3_access( TRUE )
</span></p>
% if ($c->stash('first')) {
<br><p>
%= $c->render_to_string( inline => $c->l( $c->stash('first') ) )
</p>
<p><span class=label>
%=l 'mai_LABEL_IMAP_ACCESS_CONTROL'
</span><span class=data2>
%= $c->get_current_imap_access( TRUE )
</span></p>
% } elsif ($c->stash('success')) {
<div class='success '>
%= $c->l( $c->stash('success') );
</div>
<br />
<p><span class=label>
%=l 'mai_LABEL_WEBMAIL'
</span><span class=data2>
%= $c->get_current_webmail_status( TRUE )
</span></p>
% } elsif ($c->stash('error')) {
<div class='sme-error'>
%= $c->l( $c->stash('error') );
</div>
<br />
% }
% my $btn = l('mai_DESC_STATE_ACCESS_BUTTON');
<div class='center'>
%= submit_button "$btn", class => 'action'
</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'
%= hidden_field 'trt' => 'ACC'
% end
<br>
% if ($mai_data->{trt} eq "FRONT") {
%= include 'partials/_mai_FRONT'
% }
<!--<hr class="sectionbar" />-->
%= form_for 'emailsettings' => (method => 'POST') => begin
<p><span class=label>
%=l 'mai_LABEL_VIRUS_SCAN'
</span><span class=data2>
%= $c->get_virus_status(TRUE)
</span></p>
% if ($mai_data->{trt} eq "ACC") {
%= include 'partials/_mai_ACC'
% }
<p><span class=label>
%=l 'mai_LABEL_SPAM_SCAN'
</span><span class=data2>
%= $c->get_spam_status(TRUE)
</span></p>
% if ($mai_data->{trt} eq "FIL") {
%= include 'partials/_mai_FIL'
% }
<p><span class=label>
%=l 'mai_LABEL_BLOCK_EXECUTABLE_CONTENT'
</span><span class=data2>
%= $c->get_patterns_status(TRUE)
</span></p>
% if ($mai_data->{trt} eq "REC") {
%= include 'partials/_mai_REC'
% }
% my $btn = l('mai_DESC_STATE_FILTERING_BUTTON');
<div class='center'>
%= submit_button "$btn", class => 'action'
</div>
% if ($mai_data->{trt} eq "DEL") {
%= include 'partials/_mai_DEL'
% }
%= hidden_field 'trt' => 'FIL'
% end
<br>
<!--<hr class="sectionbar" />-->
%= form_for 'emailsettings' => (method => 'POST') => begin
<p><span class=label>
%=l 'mai_LABEL_MODE'
</span><span class=data2>
%= $mai_datas->{fetchmailmethod}
</span></p>
% my $smtp_mesg;
% $smtp_mesg=l('SMTP port %u allow client to authenticate:');
<p><span class=label>
%= sprintf($smtp_mesg,$c->get_db_prop('qpsmtpd','TCPPort',25));
</span><span class=data2>
%= $c->get_current_smtp_auth( TRUE )
</span></p>
% $smtp_mesg=l('SMTPS SSL/TLS auth: port %u status:');
<p><span class=label>
%= sprintf($smtp_mesg,$c->get_db_prop('sqpsmtpd','TCPPort',465));
</span><span class=data2>
%= $c->get_current_smtp_ssl_auth( TRUE, 's', FALSE )
</span></p>
% $smtp_mesg=l 'Submission port %u status:';
<p><span class=label>
%= sprintf($smtp_mesg,$c->get_db_prop('uqpsmtpd','TCPPort',587));
</span><span class=data2>
%= $c->get_current_smtp_ssl_auth( TRUE,'u', FALSE )
</span></p>
<br />
% my $btn = l('mai_DESC_STATE_RECEPTION_BUTTON');
<div class='center'>
%= submit_button "$btn", class => 'action'
</div>
%= hidden_field 'trt' => 'REC'
% end
<br>
<!--<hr class="sectionbar" />-->
%= form_for 'emailsettings' => (method => 'POST') => begin
<p><span class=label>
%=l 'mai_LABEL_UNKNOWN'
</span><span class=data2>
%= $c->get_emailunknownuser_status( TRUE )
</span></p>
<p><span class=label>
%=l 'mai_LABEL_DELEGATE'
</span><span class=data2>
%= $c->get_value('DelegateMailServer')
</span></p>
<p><span class=label>
%=l 'mai_LABEL_SMARTHOST'
</span><span class=data2>
%= $c->get_value('SMTPSmartHost')
</span></p>
% my $btn = l('mai_DESC_STATE_DELIVERY_BUTTON');
<div class='center'>
%= submit_button "$btn", class => 'action'
</div>
%= hidden_field 'trt' => 'DEL'
% end
</div>
%end
% end

View File

@@ -1,23 +1,23 @@
% layout 'default', title => "Sme server 2 - embedded";
% layout 'default', title => "Sme server 2 - embedded";
% content_for 'module' => begin
<div id='module' class='module module-panel'>
<div id='module' class='module module-panel'>
% if (config->{debug} == 1) {
<p>
%= dumper $c->current_route
</p>
<p>
%= dumper $c->current_route
</p>
% }
% if ( stash 'error' ) {
<br><div class=sme-error>
%= $c->render_to_string(inline => stash 'error')
</div>
%}
<h1> Embedded - <%=$title %></h1><br>
<p>If the legacy panel does not appear, then you may not be logged into the original Server manager.<br />You can log in by clicking <a href="/server-manager" target='_blank'>here</a>. Or by clicking on the "Legacy SM" button at the top of the window.</p>
% my $height = $c->stash('height') | '600px';
% if ($height !~ /px$/) { $height = $height.'px';}
<object id="legacy-embedded" class="legacy-embedded" data="<%=$c->stash('modul') %>" style="width:99%;height:<%= $height %>;" title="<%= $c->stash('title') %>" type="text/html" ><%= $c->stash('title') %> not found</object>
% if ( stash 'error' ) {
<br><div class=sme-error>
%= $c->render_to_string( inline => stash 'error' )
</div>
% }
<h1> Embedded - <%= $title %></h1><br>
<p>If the legacy panel does not appear, then you may not be logged into the original Server manager.<br />You can log in by clicking <a href="/server-manager" target='_blank'>here</a>. Or by clicking on the "Legacy SM" button at the top of the window.</p>
% my $height = $c->stash('height') | '600px';
% if ( $height !~ /px$/ ) { $height = $height . 'px'; }
<object id="legacy-embedded" class="legacy-embedded" data="<%= $c->stash('modul') %>" style="width:99%;height:<%= $height %>;" title="<%= $c->stash('title') %>" type="text/html" ><%= $c->stash('title') %> not found</object>
</div>
%end
% end

View File

@@ -2,16 +2,16 @@
% content_for 'module' => begin
<div id="central" class="sme-error module">
<p><br>dev<br> Oups !!!
The page you were requesting
"<%= $self->req->url->path || '/' %>"
caused en exception !!
<br>dev<br>
<div id="central" class="sme-error module">
<p><br>dev<br> Oups !!!
The page you were requesting
"<%= $self->req->url->path || '/' %>"
caused en exception !!
<br>dev<br>
</p>
<p>
%= link_to Back => '/'
%= link_to Back => '/'
</p>
</div>
</div>
% end
% end

View File

@@ -1,33 +1,33 @@
% layout 'default', title => "Sme server 2 - groups";
% content_for 'module' => begin
<div id='module' class='module groups-panel'>
<div id='module' class='module groups-panel'>
% if (config->{debug} == 1) {
<p>
%= dumper $c->current_route
%= dumper $grp_datas
</p>
<p>
%= dumper $c->current_route
%= dumper $grp_datas
</p>
% }
% if ( stash 'error' ) {
<br><div class=sme-error>
%= $c->render_to_string(inline => stash 'error')
</div>
%}
<h1><%= $title%></h1>
% if ( stash 'error' ) {
<br><div class=sme-error>
%= $c->render_to_string( inline => stash 'error' )
</div>
% }
% if ($grp_datas->{trt} eq 'ADD') {
%= include 'partials/_grp_add'
%} elsif ($grp_datas->{trt} eq 'DEL') {
%= include 'partials/_grp_del'
%} elsif ($grp_datas->{trt} eq 'UPD') {
%= include 'partials/_grp_upd'
%} else {
%= include 'partials/_grp_list'
%}
<h1><%= $title %></h1>
% if ($grp_datas->{trt} eq 'ADD') {
%= include 'partials/_grp_add'
% } elsif ($grp_datas->{trt} eq 'DEL') {
%= include 'partials/_grp_del'
% } elsif ($grp_datas->{trt} eq 'UPD') {
%= include 'partials/_grp_upd'
% } else {
%= include 'partials/_grp_list'
% }
</div>
%end
% end

View File

@@ -1,35 +1,35 @@
% layout 'default', title => "Sme server 2 - hostentries";
% content_for 'module' => begin
<div id='module' class='module hostentries-panel'>
<div id='module' class='module hostentries-panel'>
% if (config->{debug} == 1) {
<p>
%= dumper $c->current_route
%= dumper $hos_datas
</p>
<p>
%= dumper $c->current_route
%= dumper $hos_datas
</p>
% }
<h1><%= $title%></h1>
% if ( $notif ) {
<br>
<span class=sme-error>
<%= $c->render_to_string(inline => $notif) %>
</span>
%}
<h1><%= $title %></h1>
% if ($hos_datas->{trt} eq 'ADD' or $hos_datas->{trt} eq 'UPD') {
%= include 'partials/_hos_upd'
%} elsif ($hos_datas->{trt} eq 'DEL') {
%= include 'partials/_hos_del'
%} elsif ( $hos_datas->{trt} eq 'ALC' or $hos_datas->{trt} eq 'ULC') {
%= include 'partials/_hos_ulc'
%} elsif ( $hos_datas->{trt} eq 'ARM' or $hos_datas->{trt} eq 'URM') {
%= include 'partials/_hos_urm'
%} else {
%= include 'partials/_hos_list'
%}
% if ( $notif ) {
<br>
<span class=sme-error>
<%= $c->render_to_string( inline => $notif ) %>
</span>
% }
% if ($hos_datas->{trt} eq 'ADD' or $hos_datas->{trt} eq 'UPD') {
%= include 'partials/_hos_upd'
% } elsif ($hos_datas->{trt} eq 'DEL') {
%= include 'partials/_hos_del'
% } elsif ( $hos_datas->{trt} eq 'ALC' or $hos_datas->{trt} eq 'ULC') {
%= include 'partials/_hos_ulc'
% } elsif ( $hos_datas->{trt} eq 'ARM' or $hos_datas->{trt} eq 'URM') {
%= include 'partials/_hos_urm'
% } else {
%= include 'partials/_hos_list'
% }
</div>
%end
% end

View File

@@ -1,39 +1,39 @@
% layout 'default', title => "Sme server 2 - ibays";
% content_for 'module' => begin
<div id='module' class='module ibays-panel'>
<div id='module' class='module ibays-panel'>
% if (config->{debug} == 1) {
<p>
%= dumper $c->current_route
%= dumper $iba_datas
</p>
<p>
%= dumper $c->current_route
%= dumper $iba_datas
</p>
% }
% if ( stash 'error' ) {
<br><div class=sme-error>
%= $c->render_to_string(inline => stash 'error')
</div>
%}
% if ( stash 'error' ) {
<br><div class=sme-error>
%= $c->render_to_string( inline => stash 'error' )
</div>
% }
<h1><%= $title%></h1>
<h1><%= $title %></h1>
% if ( stash 'modul' ) {
%= $c->render_to_string(inline => stash 'modul' );
% }
% if ( stash 'modul' ) {
%= $c->render_to_string( inline => stash 'modul' );
% }
% if ($iba_datas->{trt} eq 'ADD') {
%= include 'partials/_iba_upd'
%} elsif ($iba_datas->{trt} eq 'DEL') {
%= include 'partials/_iba_del'
%} elsif ($iba_datas->{trt} eq 'UPD') {
%= include 'partials/_iba_upd'
%} elsif ($iba_datas->{trt} eq 'PWD') {
%= include 'partials/_iba_pwd'
%} else {
%= include 'partials/_iba_list'
%}
% if ($iba_datas->{trt} eq 'ADD') {
%= include 'partials/_iba_upd'
% } elsif ($iba_datas->{trt} eq 'DEL') {
%= include 'partials/_iba_del'
% } elsif ($iba_datas->{trt} eq 'UPD') {
%= include 'partials/_iba_upd'
% } elsif ($iba_datas->{trt} eq 'PWD') {
%= include 'partials/_iba_pwd'
% } else {
%= include 'partials/_iba_list'
% }
</div>
%end
% end

View File

@@ -2,27 +2,27 @@
% content_for 'module' => begin
% if (config->{debug} == 1) {
<p>
%= dumper $c->current_route
</p>
% }
% if (config->{debug} == 1) {
<p>
%= dumper $c->current_route
</p>
% }
<div id='central' class='central initial-panel module'>
% if ( stash 'error' ) {
<br><div class=sme-error>
%= $c->render_to_string(inline => stash 'error')
</div>
%}
% if ( stash 'error' ) {
<br><div class=sme-error>
%= $c->render_to_string( inline => stash 'error' )
</div>
% }
<h3>
<h3>
%= $title
</h3>
<br>
<p>
</h3>
<br>
<p>
%= $modul
</p>
</p>
</div>
% end
% end

View File

@@ -2,7 +2,6 @@
PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- default +jquery -->
<head>
<title><%= $title %></title>
<link rel="made" href="mailto:bugs%40koozali.org">
@@ -11,27 +10,16 @@
%= stylesheet '/css/new_sme.css'
%= stylesheet '/css/new-sme-main.css'
%# Replaced by consolidated (and rationlised) CSS files as above March 2025
%#= stylesheet '/css/sme_core.css'
%#= stylesheet '/css/sme_main.css'
%#= stylesheet '/css/sme_menu.css'
%#= stylesheet '/css/styles.css'
%#= stylesheet '/css/sme-password.css'
%= content_for 'head_contrib'
% if (config 'hasJquery') {
%= include 'partials/_js_imports'
%= include 'common_js'
% if (config 'hasJquery') {
%= include 'partials/_js_imports'
%= include 'common_js'
% }
%= content_for 'refresh'
%= content_for 'refresh'
%= stylesheet '/js/datatables.min.css'
%= javascript '/js/datatables.min.js'
%= stylesheet '/js/jquery-ui.min.css'
%= javascript '/js/jquery-ui.min.js'
%= javascript '/js/dataTables.buttons.min.js'
%= javascript '/js/jszip.min.js'
@@ -44,26 +32,23 @@
<link rel="stylesheet" href="/smanager/css/flag-icon.min.css">
%= stylesheet '/css/sme-jquery-overrides.css'
<style>
#busy-indicator {
display: none;
margin-top: 10px;
font-weight: bold;
color: red;
}
.busy {
cursor: wait; /* Change the cursor to a 'wait' cursor */
}
</style>
%# panel specific css file
% my $controller = stash('controller');
% if ($controller) {
% my $css_path = "css/$controller.css";
%# Use the url_for helper to generate the correct static file URL
% if (app->static->file($css_path)) {
<link rel="stylesheet" href="<%= url_for("/$css_path") %>">
% }
% }
</head>
<body>
% if ( not defined $c->session->{lang} ) {
% SrvMngr::init_session ( $c );
% }
% if ( not defined $c->session->{lang} ) {
% SrvMngr::init_session ( $c );
% }
<div id="header">
%= include 'partials/_header'
% if ($c->is_logged_in && scalar @{SrvMngr::theme_list( $c )} > 1) {
@@ -72,42 +57,40 @@
</div>
<div id="container">
% if (config 'hasJquery') {
%= content 'js_toggleMenu'
% }
% if (config 'hasJquery') {
%= content 'js_toggleMenu'
% }
<div id="navigation" class="col-md-3 module">
%= include 'partials/_nav_menu'
% if ( $c->is_logged_in ) {
%= include 'partials/_user_menu'
% }
% if ( $c->is_admin ) {
%= include 'partials/_navig2'
% }
</div>
<div id="main" class="col-md-9">
%= include 'partials/_info'
% if (flash 'success') {
<br><div class="success module">
%= $c->render_to_string(inline => flash 'success')
<div id="navigation" class="col-md-3 module">
%= include 'partials/_nav_menu'
% if ( $c->is_logged_in ) {
%= include 'partials/_user_menu'
% }
% if ( $c->is_admin ) {
%= include 'partials/_navig2'
% }
</div>
% }
% if ( flash 'warning' ) {
<br><div class="sme-warning module">
%= $c->render_to_string(inline => flash 'warning')
<div id="main" class="col-md-9">
%= include 'partials/_info'
% if (flash 'success') {
<br><div class="success module">
%= $c->render_to_string(inline => flash 'success')
</div>
% }
% if ( flash 'warning' ) {
<br><div class="sme-warning module">
%= $c->render_to_string(inline => flash 'warning')
</div>
%}
% if ( flash 'error' ) {
<br><div class="sme-error module">
%= $c->render_to_string(inline => flash 'error')
</div>
%}
%= content 'module'
%= include 'partials/_footer'
</div>
%}
% if ( flash 'error' ) {
<br><div class="sme-error module">
%= $c->render_to_string(inline => flash 'error')
</div>
%}
%= content 'module'
%= include 'partials/_footer'
</div>
</div>
% if (config 'hasJquery') {
@@ -115,23 +98,17 @@
%= content 'js_togglePassword'
% }
%= javascript '/js/sme-dataTable-setup.js'
<script>
$(document).ready(function() {
// Handle form submission for any form
$('form').on('submit', function(event) {
// Disable the submit button
$(this).find('button[type="submit"], input[type="submit"]').prop('disabled', true);
// Show the busy indicator
// $('#busy-indicator').show();
// Change the cursor to "wait"
$('body').addClass('busy');
});
});
</script>
%= javascript '/js/sme-dataTable-setup.js'
%# Specific panel js code
% $controller = stash('controller');
% if ($controller) {
% my $js_path = "js/$controller.js";
%# Use the url_for helper to generate the correct static file URL
% if (app->static->file($js_path)) {
<script src="<%= url_for("/$js_path") %>"></script>
% }
% }
</body>
</html>

View File

@@ -1,32 +1,32 @@
% layout 'default', title => "Sme server 2 - localnetworks";
% content_for 'module' => begin
<div id='module' class='module localnetworks-panel'>
<div id='module' class='module localnetworks-panel'>
% if (config->{debug} == 1) {
<p>
%= dumper $c->current_route
%= dumper $c->stash("ret")
%= dumper $c->param("localnetwork");
%= dumper $c->stash("ln_datas");
%= dumper $c->param("deletehost");
</p>
<p>
%= dumper $c->current_route
%= dumper $c->stash("ret")
%= dumper $c->param("localnetwork");
%= dumper $c->stash("ln_datas");
%= dumper $c->param("deletehost");
</p>
% }
<h1><%= $title%></h1>
%= $modul
% if ($ln_datas->{trt} eq 'ADD') {
%= include 'partials/_ln_add'
%} elsif ($ln_datas->{trt} eq 'ADD1') {
%= include 'partials/_ln_add'
%} elsif ($ln_datas->{trt} eq 'DEL') {
%= include 'partials/_ln_del'
%} elsif ($ln_datas->{trt} eq 'DEL1'){
%= include 'partials/_ln_list'
%} else {
%= include 'partials/_ln_list'
%}
<h1><%= $title %></h1>
%= $modul
% if ($ln_datas->{trt} eq 'ADD') {
%= include 'partials/_ln_add'
% } elsif ($ln_datas->{trt} eq 'ADD1') {
%= include 'partials/_ln_add'
% } elsif ($ln_datas->{trt} eq 'DEL') {
%= include 'partials/_ln_del'
% } elsif ($ln_datas->{trt} eq 'DEL1'){
%= include 'partials/_ln_list'
% } else {
%= include 'partials/_ln_list'
% }
</div>
%end
% end

View File

@@ -2,68 +2,68 @@
% content_for 'module' => begin
<div id='module' class='module login-panel'>
<div id='module' class='module login-panel'>
%if ( config 'debug' ) {
<p>
%= dumper $c->current_route
%if ( stash 'trt' ) {
%= dumper stash 'trt'
%}
</p>
%}
% if ( config 'debug' ) {
<p>
%= dumper $c->current_route
% if ( stash 'trt' ) {
%= dumper stash 'trt'
% }
</p>
% }
% if ( stash 'error' ) {
<br><div class=sme-error>
%= $c->render_to_string(inline => stash 'error')
</div>
%}
% my $btn = l('use_SIGNIN');
% if ( $trt eq 'RESET' ) {
<br><div class=sme-error><h2>
%= $c->render_to_string(inline => l 'use_DESC_RESET')
</h2></div>
% $btn = l('use_RESET');
%}
<h1>
%=l 'use_TITLE'
</h1>
%= form_for '/login' => (method => 'POST') => begin
<p><span class=label>
%=l 'USER_NAME'
</span><span class=input>
%= text_field 'Username'
</span></p>
% if ( $trt ne 'RESET' ) {
<p><span class=label>
%=l 'PASSWORD'
</span><span class=input>
%= password_field 'Password', id => 'id_password', autocomplete => 'current-password', class=>'sme-password'
% if (config 'hasJquery') {
%#<a href='#' id='togglePassword' class='toggle-password tg-icon'> <img src="images/visible.png" height="16" alt="Visible"></a>
% }
</span></p>
%}
%= hidden_field 'From' => $c->tx->req->url
%= hidden_field 'Trt' => $trt
<br>
<div class='center'>
%= submit_button "$btn", class => 'action'
% if ( stash 'error' ) {
<br><div class=sme-error>
%= $c->render_to_string( inline => stash 'error' )
</div>
%if ( config 'pwdreset' ) {
<div class='center'><a href='login2'>
%=l 'use_FORGOT'
</a></div>
%}
% }
% my $btn = l('use_SIGNIN');
% if ( $trt eq 'RESET' ) {
<br><div class=sme-error><h2>
%= $c->render_to_string( inline => l 'use_DESC_RESET' )
</h2></div>
% $btn = l('use_RESET');
% }
<h1>
%= l 'use_TITLE'
</h1>
%= form_for '/login' => ( method => 'POST' ) => begin
<p><span class=label>
%= l 'USER_NAME'
</span><span class=input>
%= text_field 'Username'
</span></p>
% if ( $trt ne 'RESET' ) {
<p><span class=label>
%= l 'PASSWORD'
</span><span class=input>
%= password_field 'Password', id => 'id_password', autocomplete => 'current-password', class => 'sme-password';
% if (config 'hasJquery') {
%# <a href='#' id='togglePassword' class='toggle-password tg-icon'> <img src="images/visible.png" height="16" alt="Visible"></a>
% }
</span></p>
% }
%= hidden_field 'From' => $c->tx->req->url
%= hidden_field 'Trt' => $trt
<br>
<div class='center'>
%= submit_button "$btn", class => 'action'
</div>
% if ( config 'pwdreset' ) {
<div class='center'><a href='login2'>
%= l 'use_FORGOT'
</a></div>
% }
% end
</div>
%end
% end

View File

@@ -1,9 +1,9 @@
% layout 'default', title => 'Sme server 2 - Manual';
% content_for 'module' => begin
<div id='module' class='module manual-panel'>
<div id='module' class='module manual-panel'>
<p><h1><%= $title %></h1></p>
%= $c->render_to_string( inline => stash 'modul' )
</div>
</div>
% end

View File

@@ -1,27 +1,27 @@
% layout 'default', title => "Sme server 2 - module";
% content_for 'module' => begin
%= stylesheet '/css/module.css'
<div id='module' class='module module-panel'>
%= stylesheet '/css/module.css'
<div id='module' class='module module-panel'>
% if (config->{debug} == 1) {
<p>
<strong>Debug Info:</strong>
<pre><%= dumper $c->current_route %></pre>
</p>
<p>
<strong>Debug Info:</strong>
<pre><%= dumper $c->current_route %></pre>
</p>
% }
% if (stash 'error') {
<div class="sme-error">
<strong>Error:</strong><br>
<%= $c->render_to_string(inline => stash 'error') %>
</div>
% }
<h1><%= $title %></h1>
<div class="module-content">
<%= $c->render_to_string(inline => stash 'modul') %>
% if (stash 'error') {
<div class="sme-error">
<strong>Error:</strong><br>
<%= $c->render_to_string( inline => stash 'error' ) %>
</div>
% }
<h1><%= $title %></h1>
<div class="module-content">
<%= $c->render_to_string( inline => stash 'modul' ) %>
</div>
</div>
% end
% end

View File

@@ -2,14 +2,14 @@
% content_for 'module' => begin
<div id="central" class="sme-error module">
<p><br>dev<br> Oups !!!
The page you were requesting
"<%= $self->req->url->path || '/' %>"
could not be found.
<br>dev<br>
%= link_to Initial => '/Initial'
<div id="central" class="sme-error module">
<p><br>dev<br> Oups !!!
The page you were requesting
"<%= $self->req->url->path || '/' %>"
could not be found.
<br>dev<br>
%= link_to Initial => '/Initial'
</p>
</div>
</div>
% end
% end

View File

@@ -1,10 +1,10 @@
% layout 'defaultlight', title => 'Sme server 2 - Error P';
<div id='central' class='central not_found-panel module'>
<p><br><br>
The page you were requesting
"<%= $self->req->url->path || '/' %>"
could not be found.
<p><br><br>
The page you were requesting
"<%= $self->req->url->path || '/' %>"
could not be found.
<br><br>
%= link_to Welcome => '/'
</p>
</div>
%= link_to Welcome => '/'
</p>
</div>

View File

@@ -1,29 +1,29 @@
<div id='dom_del'>
% my $btn = l('REMOVE');
%= form_for '/domains2' => (method => 'POST') => begin
<p>
<h2>
%=l 'dom_REMOVE_TITLE'
</h2>
</p>
% my $btn = l('REMOVE');
%= form_for '/domains2' => ( method => 'POST' ) => begin
<p>
<h2>
%= l 'dom_REMOVE_TITLE'
</h2>
</p>
<p>
%= $c->l('dom_REMOVE_DESCRIPTION', $dom_datas->{domain}, $dom_datas->{description});
</p>
<p><b>
%= l('dom_ABOUT_TO_REMOVE')
<b></p>
<p>
%= $c->l( 'dom_REMOVE_DESCRIPTION', $dom_datas->{domain}, $dom_datas->{description} );
</p>
<p>
<br>
%= submit_button "$btn", class => 'action'
</p>
<p><b>
%= l('dom_ABOUT_TO_REMOVE')
<b></p>
<p>
<br>
%= submit_button "$btn", class => 'action'
</p>
%= hidden_field 'trt' => $dom_datas->{trt}
%= hidden_field 'Domain' => $dom_datas->{domain}
% end
% end
</div>
</div>

View File

@@ -1,123 +1,123 @@
<div id='dom_list'>
% my $btn = l('dom_ADD_DOMAIN');
% my $btn = l('dom_ADD_DOMAIN');
%= form_for '/domains' => (method => 'POST') => begin
%= form_for '/domains' => ( method => 'POST' ) => begin
%= l('dom_FORM_DESCRIPTION');
<p>
<br>
%= submit_button "$btn", class => 'action'
</p>
%= l('dom_FORM_DESCRIPTION');
%= hidden_field 'trt' => 'ADD'
% end
<h2>
%=l 'dom_CURRENT_DOMAINS'
</h2>
<table class="sme-border TableSort"><thead>
<tr>
<th class='sme-border'>
%=l 'DOMAIN_NAME'
</th>
<th class='sme-border'>
%=l 'DESCRIPTION_BRIEF'
</th>
<th class='sme-border'>
%=l 'dom_CONTENT'
</th>
<th class='sme-border'>
%=l 'dom_LABEL_NAMESERVERS'
</th>
<th class='sme-border'>
%=l 'ACTION'
</th>
</tr>
</thead><tbody>
% foreach my $domain ( @$domains ) {
<tr>
%= t td => (class => 'sme-border') => $domain->{Domain}
%= t td => (class => 'sme-border') => $domain->{'Description'}
%= t td => (class => 'sme-border') => $domain->{'Content'}
%= t td => (class => 'sme-border') => l('dom_' . $domain->{'Nameservers'})
%# my $actionModify = "<a href='domains2?CsrfDef=TOKEN&trt=UPD&Domain=" . $domain->{Domain} . "'>" . "<button class='sme-modify-button' title=".l('MODIFY').">".l('MODIFY')."</button>" . "</a>";
%my $modify_text = l('MODIFY'); # Localized text
%my $csrf_token = "TOKEN"; # CSRF token for security
%my $domain_name = $domain->{Domain}; # Domain name extracted from the data structure
%my $actionModify = qq{
% <a href="domains2?CsrfDef=$csrf_token&trt=UPD&Domain=$domain_name">
% <button type='button' class='sme-modify-button' title='$modify_text' >
% $modify_text
% </button>
% </a>
%};
%my $removable = ($domain->{Removable} || 'yes');
%my $actionRemove = '&nbsp;';
%if ($removable eq 'yes') {
%my $remove_text = l('REMOVE'); # Localized text
%my $csrf_token = "TOKEN"; # CSRF token for security
%my $domain_name = $domain->{Domain}; # Domain name extracted from the data structure
%$actionRemove = qq{
% <a href="domains2?CsrfDef=$csrf_token&trt=DEL&Domain=$domain_name">
% <button type='button' class='sme-remove-button' title='$remove_text' >
% $remove_text
% </button>
% </a>
%};
%# $actionRemove = "<a href='domains2?CsrfDef=TOKEN&trt=DEL&Domain=" . $domain->{Domain} . "'>" . "<button class='sme-remove-button' title=".l('REMOVE').">".l('REMOVE')."</button>" . "</a>";
%};
<td class='sme-border' style="min-width:15em">
<%= $c->render_to_string(inline => $actionModify) %> <%= $c->render_to_string(inline => $actionRemove) %>
</td>
</tr>
% }
</tbody>
</table>
<p>
<br>
%= submit_button "$btn", class => 'action'
</p>
%= hidden_field 'trt' => 'ADD'
%= form_for '/domains' => (method => 'POST') => begin
% end
<!-- <HR class="sectionbar">-->
<br>
<h2>
%= l 'dom_CURRENT_DOMAINS'
</h2>
<table class="sme-border TableSort"><thead>
<tr>
<th class='sme-border'>
%= l 'DOMAIN_NAME'
</th>
<th class='sme-border'>
%= l 'DESCRIPTION_BRIEF'
</th>
<th class='sme-border'>
%= l 'dom_CONTENT'
</th>
<th class='sme-border'>
%= l 'dom_LABEL_NAMESERVERS'
</th>
<th class='sme-border'>
%= l 'ACTION'
</th>
</tr>
</thead><tbody>
% my $btn2 = l('dom_DOMAINS_PAGE_CORPORATE_DNS');
% foreach my $domain ( @$domains ) {
<tr>
%= t td => ( class => 'sme-border' ) => $domain->{Domain}
%= t td => ( class => 'sme-border' ) => $domain->{'Description'}
%= t td => ( class => 'sme-border' ) => $domain->{'Content'}
%= t td => ( class => 'sme-border' ) => l( 'dom_' . $domain->{'Nameservers'} )
<h3>
%= l 'dom_DESC_CORPORATE_DNS_CURRENT'
</h3>
%# my $actionModify = "<a href='domains2?CsrfDef=TOKEN&trt=UPD&Domain=" . $domain->{Domain} . "'>" . "<button class='sme-modify-button' title=".l('MODIFY').">".l('MODIFY')."</button>" . "</a>";
% my $modify_text = l('MODIFY'); # Localized text
% my $csrf_token = "TOKEN"; # CSRF token for security
% my $domain_name = $domain->{Domain}; # Domain name extracted from the data structure
% my $actionModify = qq{
% <a href="domains2?CsrfDef=$csrf_token&trt=UPD&Domain=$domain_name">
% <button type='button' class='sme-modify-button' title='$modify_text' >
% $modify_text
% </button>
% </a>
% };
% my $removable = ( $domain->{Removable} || 'yes' );
% my $actionRemove = '&nbsp;';
% if ($removable eq 'yes') {
% my $remove_text = l('REMOVE'); # Localized text
% my $csrf_token = "TOKEN"; # CSRF token for security
% my $domain_name = $domain->{Domain}; # Domain name extracted from the data structure
% $actionRemove = qq{
% <a href="domains2?CsrfDef=$csrf_token&trt=DEL&Domain=$domain_name">
% <button type='button' class='sme-remove-button' title='$remove_text' >
% $remove_text
% </button>
% </a>
% };
%# $actionRemove = "<a href='domains2?CsrfDef=TOKEN&trt=DEL&Domain=" . $domain->{Domain} . "'>" . "<button class='sme-remove-button' title=".l('REMOVE').">".l('REMOVE')."</button>" . "</a>";
% };
<td class='sme-border' style="min-width:15em">
<%= $c->render_to_string( inline => $actionModify ) %> <%= $c->render_to_string( inline => $actionRemove ) %>
</td>
</tr>
% }
<p>
<span class=label>
%=l 'dom_LABEL_CORPORATE_DNS_PRIMARY'
</span><span class=data>
%= $dom_datas->{forwarder}
</span>
</p>
</tbody>
</table>
% if ($dom_datas->{forwarder2}) {
<p>
<span class=label>
%=l 'dom_LABEL_CORPORATE_DNS_SECONDARY'
</span><span class=data>
%= $dom_datas->{forwarder2}
</span>
</p>
% }
%= hidden_field 'trt' => 'ADD'
<p>
%= submit_button "$btn2", class => 'action'
</p>
%= hidden_field 'trt' => 'UP2'
% end
%= form_for '/domains' => ( method => 'POST' ) => begin
<!-- <HR class="sectionbar">-->
<br>
% my $btn2 = l('dom_DOMAINS_PAGE_CORPORATE_DNS');
<h3>
%= l 'dom_DESC_CORPORATE_DNS_CURRENT'
</h3>
<p>
<span class=label>
%= l 'dom_LABEL_CORPORATE_DNS_PRIMARY'
</span><span class=data>
%= $dom_datas->{forwarder}
</span>
</p>
% if ($dom_datas->{forwarder2}) {
<p>
<span class=label>
%= l 'dom_LABEL_CORPORATE_DNS_SECONDARY'
</span><span class=data>
%= $dom_datas->{forwarder2}
</span>
</p>
% }
<p>
%= submit_button "$btn2", class => 'action'
</p>
%= hidden_field 'trt' => 'UP2'
% end
</div>
</div>

View File

@@ -1,37 +1,37 @@
<div id='dom_up2'>
% my $btn = l('SAVE');
% my $btn = l('SAVE');
%= form_for '/domains2' => (method => 'POST') => begin
%= form_for '/domains2' => ( method => 'POST' ) => begin
<p><br>
%=l 'dom_DESC_CORPORATE_DNS'
</p>
<p><br>
%= l 'dom_DESC_CORPORATE_DNS'
</p>
<p>
<span class=label>
%=l 'dom_LABEL_CORPORATE_DNS_PRIMARY'
</span><span class=data>
% param 'Forwarder' => $dom_datas->{forwarder} unless param 'Forwarder';
%= text_field 'Forwarder', class => 'input'
</span>
</p>
<p>
<span class=label>
%= l 'dom_LABEL_CORPORATE_DNS_PRIMARY'
</span><span class=data>
% param 'Forwarder' => $dom_datas->{forwarder} unless param 'Forwarder';
%= text_field 'Forwarder', class => 'input'
</span>
</p>
<p>
<span class=label>
%=l 'dom_LABEL_CORPORATE_DNS_SECONDARY', class => 'label'
</span><span class=data>
% param 'Forwarder2' => $dom_datas->{forwarder2} unless param 'Forwarder2';
%= text_field 'Forwarder2', class => 'input'
</span>
</p>
<p>
<span class=label>
%= l 'dom_LABEL_CORPORATE_DNS_SECONDARY', class => 'label'
</span><span class=data>
% param 'Forwarder2' => $dom_datas->{forwarder2} unless param 'Forwarder2';
%= text_field 'Forwarder2', class => 'input'
</span>
</p>
<p>
%= submit_button "$btn", class => 'action'
</p>
<p>
%= submit_button "$btn", class => 'action'
</p>
%= hidden_field 'trt' => $dom_datas->{trt}
%end
%= hidden_field 'trt' => $dom_datas->{trt}
% end
</div>

View File

@@ -1,70 +1,70 @@
<div id='dom_upd'>
% my $btn = l('ADD');
% my $btn = l('ADD');
%= form_for '/domains2' => (method => 'POST') => begin
<p>
<h2>
% if ( $dom_datas->{trt} eq "ADD" ) {
%=l 'dom_CREATE_TITLE'
% } else {
%=l 'dom_MODIFY_TITLE'
% $btn = l('MODIFY');
% }
</h2>
</p>
%= form_for '/domains2' => ( method => 'POST' ) => begin
<p>
<h2>
% if ( $dom_datas->{trt} eq "ADD" ) {
%= l 'dom_CREATE_TITLE'
% } else {
%= l 'dom_MODIFY_TITLE'
% $btn = l('MODIFY');
% }
</h2>
</p>
<p><br>
<span class=label>
%=l 'DOMAIN_NAME', class => 'label'
</span><span class=data>
% if ( $dom_datas->{trt} eq "ADD" ) {
% param 'Domain' => $dom_datas->{domain} unless param 'Domain';
%= text_field 'Domain', class => 'input'
% } else {
%= hidden_field 'Domain' => $dom_datas->{domain}
%= $dom_datas->{domain}, class => 'data'
% }
</span>
</p>
<p><br>
<span class=label>
%= l 'DOMAIN_NAME', class => 'label'
</span><span class=data>
% if ( $dom_datas->{trt} eq "ADD" ) {
% param 'Domain' => $dom_datas->{domain} unless param 'Domain';
%= text_field 'Domain', class => 'input'
% } else {
%= hidden_field 'Domain' => $dom_datas->{domain}
%= $dom_datas->{domain}, class => 'data'
% }
</span>
</p>
<p><br>
<span class=label>
%=l 'DESCRIPTION_BRIEF', class => 'label'
</span><span class=data>
% param 'Description' => $dom_datas->{description} unless param 'Description';
%= text_field 'Description', class => 'input'
</span>
</p>
<p><br>
<span class=label>
%= l 'DESCRIPTION_BRIEF', class => 'label'
</span><span class=data>
% param 'Description' => $dom_datas->{description} unless param 'Description';
%= text_field 'Description', class => 'input'
</span>
</p>
<p><br>
%=l 'dom_CONTENT_FIELD_DESCRIPTION'
<br>
<span class=label>
%= $c->l('dom_CONTENT', '');
</span><span class=data>
% param 'Content' => $dom_datas->{content} unless param 'Content';
%= select_field 'Content', $c->content_options_list(), class => 'input'
</span>
</p>
<p><br>
%= l 'dom_CONTENT_FIELD_DESCRIPTION'
<br>
<span class=label>
%= $c->l( 'dom_CONTENT', '' );
</span><span class=data>
% param 'Content' => $dom_datas->{content} unless param 'Content';
%= select_field 'Content', $c->content_options_list(), class => 'input'
</span>
</p>
<p><br>
%=l 'dom_DESC_NAMESERVERS'
<br>
<span class=label>
%=l 'dom_LABEL_NAMESERVERS', class => 'label'
</span><span class=data>
% param 'Nameservers' => $dom_datas->{nameservers} unless param 'Nameservers';
%= select_field 'Nameservers', $c->nameserver_options_list(), class => 'input'
</span>
</p>
<p><br>
%= l 'dom_DESC_NAMESERVERS'
<br>
<span class=label>
%= l 'dom_LABEL_NAMESERVERS', class => 'label'
</span><span class=data>
% param 'Nameservers' => $dom_datas->{nameservers} unless param 'Nameservers';
%= select_field 'Nameservers', $c->nameserver_options_list(), class => 'input'
</span>
</p>
<p><br>
%= submit_button "$btn", class => 'action'
</p>
<p><br>
%= submit_button "$btn", class => 'action'
</p>
%= hidden_field 'trt' => $dom_datas->{trt}
%end
%= hidden_field 'trt' => $dom_datas->{trt}
% end
</div>

View File

@@ -1,14 +1,14 @@
<div id="footer" class="module">
<!--<HR class="sme-copyrightbar">-->
<a href="https://mojolicious.org" target="_blank"><img src="images/sme-mojo-logo-white.png" style="position:relative;"></a>
<font class="sme-copyright">
% if ( $c->is_logged_in && $c->is_admin) {
SME Server <%= session 'releaseVersion' %>-<%= $c->app->VERSION %> Manager II
% my $mode;
% if (config->{mode} eq 'development'){ $mode = '-dev';} else { $mode = '';}
(Mojo:<%= Mojolicious->VERSION %><%= $mode %>)
% }
<br>Copyright 1999-2006 Mitel Corporation<br>
%= session 'copyRight'
<br>Copyright (c) 2013-2024 Koozali Foundation Inc.<br>
</font>
<!--<HR class="sme-copyrightbar">-->
<a href="https://mojolicious.org" target="_blank"><img src="images/sme-mojo-logo-white.png" style="position:relative;"></a>
<font class="sme-copyright">
% if ( $c->is_logged_in && $c->is_admin) {
SME Server <%= session 'releaseVersion' %>-<%= $c->app->VERSION %> Manager II
% my $mode;
% if ( config->{mode} eq 'development' ) { $mode = '-dev'; } else { $mode = ''; }
(Mojo:<%= Mojolicious->VERSION %><%= $mode %>)
% }
<br>Copyright 1999-2006 Mitel Corporation<br>
%= session 'copyRight'
<br>Copyright (c) 2013-2024 Koozali Foundation Inc.<br>
</font>

View File

@@ -1,59 +1,59 @@
<div id='grp_add'>
% my $btn = l('ADD');
% my $btn = l('ADD');
%= form_for '/groups2' => (method => 'POST') => begin
<p><h2>
%=l 'CREATE_GROUP'
</h2><br><br>
%=l 'grp_GROUP_NAMING'
</p>
%= form_for '/groups2' => ( method => 'POST' ) => begin
<p><h2>
%= l 'CREATE_GROUP'
</h2><br><br>
%= l 'grp_GROUP_NAMING'
</p>
<p>
<span class=label>
%=l 'GROUP_NAME', class => 'label'
</span><span class=data>
%= text_field 'groupName', class => 'input'
</span>
</p>
<p>
<span class=label>
%= l 'GROUP_NAME', class => 'label'
</span><span class=data>
%= text_field 'groupName', class => 'input'
</span>
</p>
<p>
%=l 'grp_GROUP_DESC_EXPL'
<br><br>
<span class=label>
%=l 'grp_GROUP_DESC', class => 'label'
</span><span class=data>
%= text_field 'groupDesc', class => 'input'
</span>
</p>
<p>
%= l 'grp_GROUP_DESC_EXPL'
<br><br>
<span class=label>
%= l 'grp_GROUP_DESC', class => 'label'
</span><span class=data>
%= text_field 'groupDesc', class => 'input'
</span>
</p>
<p>
<span class=label>
%=l 'GROUP_MEMBERS', class => 'label'
</span>
<br>
<span class=data>
%= check_box 'groupMembers' => 'admin'
Administrator (admin)
<br>
% my $users = $c->gen_users_list();
% foreach my $key ( sort keys %$users )
% {
%= check_box 'groupMembers' => $key
%=$users->{$key}
%= "(" . $key . ")"
<br>
% }
<p>
<span class=label>
%= l 'GROUP_MEMBERS', class => 'label'
</span>
<br>
<span class=data>
%= check_box 'groupMembers' => 'admin'
Administrator (admin)
<br>
% my $users = $c->gen_users_list();
% foreach my $key ( sort keys %$users )
% {
%= check_box 'groupMembers' => $key
%= $users->{$key}
%= "(" . $key . ")"
<br>
% }
</span>
</p>
</p>
<p>
<br><br>
%= submit_button "$btn", class => 'action'
</p>
<p>
<br><br>
%= submit_button "$btn", class => 'action'
</p>
%= hidden_field 'trt' => $grp_datas->{trt}
% end
%= hidden_field 'trt' => $grp_datas->{trt}
% end
</div>

View File

@@ -1,63 +1,63 @@
<div id='grp_del'>
% my $btn = l('REMOVE');
%= form_for '/groups2' => (method => 'POST') => begin
<p><h2>
%=l 'REMOVE_USER_GROUP'
</h2>
% my $btn = l('REMOVE');
%= form_for '/groups2' => ( method => 'POST' ) => begin
<p><h2>
%= l 'REMOVE_USER_GROUP'
</h2>
<p>
%=l('grp_DELETE_DESCRIPTION', $grp_datas->{group})
</p>
<p>
%= l( 'grp_DELETE_DESCRIPTION', $grp_datas->{group} )
</p>
<p>
% my $size = keys %$members;
% if ( ! $size ){
%=l 'ACCOUNT_GROUP_NONE'
% } else {
%=l 'grp_GROUP_HAS_MEMBERS'
<br>
<ul>
% foreach my $key ( keys %$members)
% {
<li>
%=$key
(
%=$members->{$key}
)
</li>
% }
</ul>
% }
</p>
<p>
% my $size = keys %$members;
% if ( ! $size ){
%= l 'ACCOUNT_GROUP_NONE'
% } else {
%= l 'grp_GROUP_HAS_MEMBERS'
<br>
<ul>
% foreach my $key ( keys %$members )
% {
<li>
%= $key
(
%= $members->{$key}
)
</li>
% }
</ul>
% }
</p>
<p>
% $size = keys %$ibays;
% if ( $size ) {
%=l 'grp_IBAYS_WILL_BE_CHANGED'
<br>
<ul>
% foreach my $key (sort ( keys %$ibays ))
% {
<li>
%=$key
(
%=$ibays->{$key}
)
</li>
% }
</ul>
% }
</p>
<p>
<br>
%= submit_button "$btn", class => 'action'
</p>
<p>
% $size = keys %$ibays;
% if ( $size ) {
%= l 'grp_IBAYS_WILL_BE_CHANGED'
<br>
<ul>
% foreach my $key ( sort ( keys %$ibays ) )
% {
<li>
%= $key
(
%= $ibays->{$key}
)
</li>
% }
</ul>
% }
</p>
%= hidden_field 'trt' => $grp_datas->{trt}
%= hidden_field 'groupName' => $grp_datas->{group}
<p>
<br>
%= submit_button "$btn", class => 'action'
</p>
% end
%= hidden_field 'trt' => $grp_datas->{trt}
%= hidden_field 'groupName' => $grp_datas->{group}
</div>
% end
</div>

View File

@@ -1,72 +1,72 @@
<div id='grp_list'>
% my $btn = l('GROUP_ADD');
% my $btn = l('GROUP_ADD');
%= form_for '/groups' => (method => 'POST') => begin
%= form_for '/groups' => ( method => 'POST' ) => begin
%= hidden_field 'trt' => 'ADD'
%= hidden_field 'trt' => 'ADD'
<p> <br>
%= submit_button "$btn", class => 'action'
</p>
% end
<p> <br>
%= submit_button "$btn", class => 'action'
</p>
% end
<p> <h2>
%=l 'grp_CURRENT_LIST'
</h2><br><br>
% my $numGroups = @$groups;
% if ($numGroups == 0){
%=l 'ACCOUNT_GROUP_NONE'
% } else {
<table class="sme-border TableSort"><thead>
<tr>
<th class='sme-border'>
%=l 'GROUP'
</th>
<th class='sme-border'>
%=l 'DESCRIPTION'
</th>
<th class='sme-border'>
%=l 'ACTION'
</th>
</tr>
</thead><tbody>
% foreach my $group ( @$groups )
% {
<p> <h2>
%= l 'grp_CURRENT_LIST'
</h2><br><br>
% my $numGroups = @$groups;
% if ($numGroups == 0){
%= l 'ACCOUNT_GROUP_NONE'
% } else {
<table class="sme-border TableSort"><thead>
<tr>
%= t td => (class => 'sme-border') => $group->key
%= t td => (class => 'sme-border') => $group->prop('Description')
<td class='sme-border' style="min-width:15em">
%my $modify_text = l('MODIFY'); # Localized text
%my $csrf_token = "TOKEN"; # CSRF token for security
%my $group_name = $group->key; # group name extracted from the data structure
%my $actionModify = qq{
% <a href="groups2?CsrfDef=$csrf_token&trt=UPD&group=$group_name">
% <button type='button' class='sme-modify-button' title='$modify_text' >
% $modify_text
% </button>
% </a>
%};
%my $remove_text = l('REMOVE'); # Localized text
%my $csrf_token = "TOKEN"; # CSRF token for security
%my $group_name = $group->key; # group name extracted from the data structure
%my $actionRemove = qq{
% <a href="groups2?CsrfDef=$csrf_token&trt=DEL&group=$group_name">
% <button type='button' class='sme-remove-button' title='$remove_text' >
% $remove_text
% </button>
% </a>
%};
<%= $c->render_to_string(inline => $actionModify) %> <%= $c->render_to_string(inline => $actionRemove) %>
</td>
</tr>
% }
</tbody>
</table>
<%} %>
</p>
<th class='sme-border'>
%= l 'GROUP'
</th>
<th class='sme-border'>
%= l 'DESCRIPTION'
</th>
<th class='sme-border'>
%= l 'ACTION'
</th>
</tr>
</thead><tbody>
% foreach my $group (@$groups)
% {
<tr>
%= t td => ( class => 'sme-border' ) => $group->key
%= t td => ( class => 'sme-border' ) => $group->prop('Description')
<td class='sme-border' style="min-width:15em">
% my $modify_text = l('MODIFY'); # Localized text
% my $csrf_token = "TOKEN"; # CSRF token for security
% my $group_name = $group->key; # group name extracted from the data structure
% my $actionModify = qq{
% <a href="groups2?CsrfDef=$csrf_token&trt=UPD&group=$group_name">
% <button type='button' class='sme-modify-button' title='$modify_text' >
% $modify_text
% </button>
% </a>
% };
% my $remove_text = l('REMOVE'); # Localized text
% my $csrf_token = "TOKEN"; # CSRF token for security
% my $group_name = $group->key; # group name extracted from the data structure
% my $actionRemove = qq{
% <a href="groups2?CsrfDef=$csrf_token&trt=DEL&group=$group_name">
% <button type='button' class='sme-remove-button' title='$remove_text' >
% $remove_text
% </button>
% </a>
% };
<%= $c->render_to_string( inline => $actionModify ) %> <%= $c->render_to_string( inline => $actionRemove ) %>
</td>
</tr>
% }
</tbody>
</table>
<% } %>
</p>
</div>

View File

@@ -1,69 +1,69 @@
<div id='grp_upd'>
% my $btn = l('SAVE');
% my $btn = l('SAVE');
%= form_for '/groups2' => (method => 'POST') => begin
%= form_for '/groups2' => ( method => 'POST' ) => begin
<p><h2>
%=l 'MODIFY_USER_GROUP'
</h2><br></p>
<p><h2>
%= l 'MODIFY_USER_GROUP'
</h2><br></p>
<p>
<span class=label>
%=l 'GROUP_NAME', class => 'label'
</span><span class=data>
%= $grp_datas->{group}, class => 'data'
</span>
</p>
<p>
<span class=label>
%= l 'GROUP_NAME', class => 'label'
</span><span class=data>
%= $grp_datas->{group}, class => 'data'
</span>
</p>
<p>
%=l 'grp_GROUP_DESC_EXPL'
<br><br>
<span class=label>
%=l 'grp_GROUP_DESC', class => 'label'
</span><span class=data>
% param 'groupDesc' => $grp_datas->{description} unless param 'groupDesc';
%= text_field 'groupDesc', class => 'input'
</span>
</p>
<p>
%= l 'grp_GROUP_DESC_EXPL'
<br><br>
<span class=label>
%= l 'grp_GROUP_DESC', class => 'label'
</span><span class=data>
% param 'groupDesc' => $grp_datas->{description} unless param 'groupDesc';
%= text_field 'groupDesc', class => 'input'
</span>
</p>
<p>
<span class=label>
%=l 'GROUP_MEMBERS', class => 'label'
</span>
<br>
<span class=data>
% if ( $members->{'admin'} ) {
%= check_box 'groupMembers', value => 'admin', checked => undef
%} else {
%= check_box 'groupMembers' => 'admin'
%}
Administrator (admin)
<br>
<p>
<span class=label>
%= l 'GROUP_MEMBERS', class => 'label'
</span>
<br>
<span class=data>
% if ( $members->{'admin'} ) {
%= check_box 'groupMembers', value => 'admin', checked => undef
% } else {
%= check_box 'groupMembers' => 'admin'
% }
Administrator (admin)
<br>
% my $users = $c->gen_users_list();
% foreach my $key ( sort keys %$users )
% {
% if ( $members->{ $key } ) {
<!-- % = check_box 'groupMembers', value => $key, checked => 'checked' -->
<input type='checkbox' name='groupMembers' checked value='<%= $key %>'>
%} else {
%= check_box 'groupMembers' => $key
%}
%=$users->{$key} . " (" . $key . ")"
<br>
% }
% my $users = $c->gen_users_list();
% foreach my $key ( sort keys %$users )
% {
% if ( $members->{ $key } ) {
<!-- % = check_box 'groupMembers', value => $key, checked => 'checked' -->
<input type='checkbox' name='groupMembers' checked value='<%= $key %>'>
% } else {
%= check_box 'groupMembers' => $key
% }
%= $users->{$key} . " (" . $key . ")"
<br>
% }
</span>
</p>
</p>
<p>
<br><br>
%= submit_button "$btn", class => 'action'
</p>
<p>
<br><br>
%= submit_button "$btn", class => 'action'
</p>
%= hidden_field 'trt' => $grp_datas->{trt}
%= hidden_field 'groupName' => $grp_datas->{group}
% end
%= hidden_field 'trt' => $grp_datas->{trt}
%= hidden_field 'groupName' => $grp_datas->{group}
% end
</div>

View File

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

View File

@@ -1,29 +1,29 @@
<div id='hos_del'>
% my $btn = l('REMOVE');
%= form_for '/hostentriesd' => (method => 'POST') => begin
<p>
<h2>
%=l 'hos_REMOVE_TITLE'
</h2>
</p>
% my $btn = l('REMOVE');
%= form_for '/hostentriesd' => ( method => 'POST' ) => begin
<p>
<h2>
%= l 'hos_REMOVE_TITLE'
</h2>
</p>
<p>
%= $c->l('hos_REMOVE_PAGE_DESCRIPTION', $hos_datas->{hostname});
</p>
<p><b>
%=l 'hos_ABOUT_TO_REMOVE'
</b></p>
<p>
%= $c->l( 'hos_REMOVE_PAGE_DESCRIPTION', $hos_datas->{hostname} );
</p>
<p>
<br>
%= submit_button "$btn", class => 'action'
</p>
<p><b>
%= l 'hos_ABOUT_TO_REMOVE'
</b></p>
%= hidden_field 'trt' => $hos_datas->{trt}
%= hidden_field 'Hostname' => $hos_datas->{hostname}
<p>
<br>
%= submit_button "$btn", class => 'action'
</p>
% end
%= hidden_field 'trt' => $hos_datas->{trt}
%= hidden_field 'Hostname' => $hos_datas->{hostname}
% end
</div>

View File

@@ -1,84 +1,84 @@
<div id='hos_list'>
% my $btn = l('hos_ADD_HOSTNAME');
% my $btn = l('hos_ADD_HOSTNAME');
%= form_for '/hostentries' => (method => 'POST') => begin
%= form_for '/hostentries' => ( method => 'POST' ) => begin
<p>
%= submit_button "$btn", class => 'action'
<br></p>
<p>
%= submit_button "$btn", class => 'action'
<br></p>
%= hidden_field 'trt' => $hos_datas->{trt}
%= hidden_field 'trt' => $hos_datas->{trt}
% end
% end
% my %dom_hos = %{$dom_hosts};
% foreach my $domain ( sort ( keys %dom_hos ) ) {
% my %dom_hos = %{$dom_hosts};
% foreach my $domain ( sort ( keys %dom_hos ) ) {
<p><br><b>
%= $c->l('hos_CURRENT_HOSTNAMES_FOR_LOCAL_DOMAIN', $domain);
</b><br></p>
<table class="sme-border TableSort"><thead>
<tr>
<th class='sme-border'>
%=l 'hos_HOSTNAME'
</th>
<th class='sme-border'>
%=l 'hos_HOSTTYPE'
</th>
<th class='sme-border'>
%=l 'IP_ADDRESS_OR_FQDN'
</th>
<th class='sme-border'>
%=l 'hos_ETHERNET_ADDRESS'
</th>
<th class='sme-border'>
%=l 'COMMENT'
</th>
<th class='sme-border'>
%=l 'ACTION'
</th>
</tr>
</thead><tbody>
<p><br><b>
%= $c->l( 'hos_CURRENT_HOSTNAMES_FOR_LOCAL_DOMAIN', $domain );
</b><br></p>
% foreach (@{$dom_hos{$domain}{'HOSTS'}}) {
<table class="sme-border TableSort"><thead>
<tr>
%= t td => (class => 'sme-border') => $_->{'HostName'};
%= t td => (class => 'sme-border') => $_->{'HostType'};
%= t td => (class => 'sme-border') => $_->{'IP'};
%= t td => (class => 'sme-border') => $_->{'MACAddress'};
%= t td => (class => 'sme-border') => $_->{'Comment'};
<td class='sme-border' style="min-width:15em">
%my ($actionModify, $actionRemove) = '&nbsp;';
%my $static = $_->{'static'} || "no";
%if ($static ne 'yes') {
%my $modify_text = l('MODIFY'); # Localized text
%my $csrf_token = "TOKEN"; # CSRF token for security
%my $hostentries_name = $_->{'HostName'}; # hostentries name extracted from the data structure
%$actionModify = qq{
% <a href="hostentriesd?CsrfDef=$csrf_token&trt=UPD&Hostname=$hostentries_name">
% <button type='button' class='sme-modify-button' title='$modify_text' >
% $modify_text
% </button>
% </a>
%};
%my $remove_text = l('REMOVE'); # Localized text
%$csrf_token = "TOKEN"; # CSRF token for security
%#my $hostentries_name = $_->{'HostName'}; # hostentries name extracted from the data structure
%$actionRemove = qq{
% <a href="hostentriesd?CsrfDef=$csrf_token&trt=DEL&Hostname=$hostentries_name">
% <button type='button' class='sme-remove-button' title='$remove_text' >
% $remove_text
% </button>
% </a>
%};
%}
<%= $c->render_to_string(inline => $actionModify) %> <%= $c->render_to_string(inline => $actionRemove) %>
</td>
</tr>
% }
</tbody>
</table>
% }
<th class='sme-border'>
%= l 'hos_HOSTNAME'
</th>
<th class='sme-border'>
%= l 'hos_HOSTTYPE'
</th>
<th class='sme-border'>
%= l 'IP_ADDRESS_OR_FQDN'
</th>
<th class='sme-border'>
%= l 'hos_ETHERNET_ADDRESS'
</th>
<th class='sme-border'>
%= l 'COMMENT'
</th>
<th class='sme-border'>
%= l 'ACTION'
</th>
</tr>
</thead><tbody>
% foreach (@{$dom_hos{$domain}{'HOSTS'}}) {
<tr>
%= t td => ( class => 'sme-border' ) => $_->{'HostName'};
%= t td => ( class => 'sme-border' ) => $_->{'HostType'};
%= t td => ( class => 'sme-border' ) => $_->{'IP'};
%= t td => ( class => 'sme-border' ) => $_->{'MACAddress'};
%= t td => ( class => 'sme-border' ) => $_->{'Comment'};
<td class='sme-border' style="min-width:15em">
% my ( $actionModify, $actionRemove ) = '&nbsp;';
% my $static = $_->{'static'} || "no";
% if ($static ne 'yes') {
% my $modify_text = l('MODIFY'); # Localized text
% my $csrf_token = "TOKEN"; # CSRF token for security
% my $hostentries_name = $_->{'HostName'}; # hostentries name extracted from the data structure
% $actionModify = qq{
% <a href="hostentriesd?CsrfDef=$csrf_token&trt=UPD&Hostname=$hostentries_name">
% <button type='button' class='sme-modify-button' title='$modify_text' >
% $modify_text
% </button>
% </a>
% };
% my $remove_text = l('REMOVE'); # Localized text
% $csrf_token = "TOKEN"; # CSRF token for security
%# my $hostentries_name = $_->{'HostName'}; # hostentries name extracted from the data structure
% $actionRemove = qq{
% <a href="hostentriesd?CsrfDef=$csrf_token&trt=DEL&Hostname=$hostentries_name">
% <button type='button' class='sme-remove-button' title='$remove_text' >
% $remove_text
% </button>
% </a>
% };
% }
<%= $c->render_to_string( inline => $actionModify ) %> <%= $c->render_to_string( inline => $actionRemove ) %>
</td>
</tr>
% }
</tbody>
</table>
% }
</div>

View File

@@ -1,60 +1,60 @@
<div id='hos_ulc'>
<!-- UPDATE HOST TYPE -->
<!-- UPDATE HOST TYPE -->
% my $btn = l('NEXT');
% my $btn = l('NEXT');
%= form_for '/hostentriesd' => (method => 'POST') => begin
<p><h2>
% if ( $hos_datas->{trt} eq "ALC" ) {
%=l 'hos_CREATE_TYPE'
% } else {
%=l 'hos_MODIFY_TYPE'
% $btn = l('MODIFY');
% }
</h2></p>
%= form_for '/hostentriesd' => ( method => 'POST' ) => begin
<p><h2>
% if ( $hos_datas->{trt} eq "ALC" ) {
%= l 'hos_CREATE_TYPE'
% } else {
%= l 'hos_MODIFY_TYPE'
% $btn = l('MODIFY');
% }
</h2></p>
<p>
%=l 'hos_LOCAL_PAGE_DESCRIPTION'
</p>
<p>
%= l 'hos_LOCAL_PAGE_DESCRIPTION'
</p>
<p>
%=l 'hos_LOCAL_IP_DESCRIPTION'
</p>
<p>
%= l 'hos_LOCAL_IP_DESCRIPTION'
</p>
<p>
<span class=label>
%=l 'hos_LOCAL_IP', class => 'label'
</span><span class=data>
% param 'Internalip' => $hos_datas->{internalip} unless param 'Internalip';
%= text_field 'Internalip', class => 'input'
</span>
</p>
<p>
<span class=label>
%= l 'hos_LOCAL_IP', class => 'label'
</span><span class=data>
% param 'Internalip' => $hos_datas->{internalip} unless param 'Internalip';
%= text_field 'Internalip', class => 'input'
</span>
</p>
<p>
%=l 'hos_ETHERNET_ADDRESS_DESCRIPTION'
</p>
<p>
%= l 'hos_ETHERNET_ADDRESS_DESCRIPTION'
</p>
<p>
<span class=label>
%=l 'hos_ETHERNET_ADDRESS', class => 'label'
</span><span class=data>
% param 'Macaddress' => $hos_datas->{macaddress} unless param 'Macaddress';
%= text_field 'Macaddress', class => 'input'
</span>
</p>
<p>
<span class=label>
%= l 'hos_ETHERNET_ADDRESS', class => 'label'
</span><span class=data>
% param 'Macaddress' => $hos_datas->{macaddress} unless param 'Macaddress';
%= text_field 'Macaddress', class => 'input'
</span>
</p>
<p><br>
%= submit_button "$btn", class => 'action'
</p>
<p><br>
%= submit_button "$btn", class => 'action'
</p>
%= hidden_field 'trt' => $hos_datas->{trt}
%= hidden_field 'Hostname' => $hos_datas->{hostname}
%= hidden_field 'Name' => $hos_datas->{name}
%= hidden_field 'Domain' => $hos_datas->{domain}
%= hidden_field 'Comment'=> $hos_datas->{comment}
%= hidden_field 'Hosttype'=> $hos_datas->{hosttype}
%= hidden_field 'Externalip' => $hos_datas->{externalip}
%end
%= hidden_field 'trt' => $hos_datas->{trt}
%= hidden_field 'Hostname' => $hos_datas->{hostname}
%= hidden_field 'Name' => $hos_datas->{name}
%= hidden_field 'Domain' => $hos_datas->{domain}
%= hidden_field 'Comment' => $hos_datas->{comment}
%= hidden_field 'Hosttype' => $hos_datas->{hosttype}
%= hidden_field 'Externalip' => $hos_datas->{externalip}
% end
</div>

View File

@@ -1,77 +1,77 @@
<div id='hos_upd'>
% my $btn = l('NEXT');
% my $btn = l('NEXT');
%= form_for '/hostentriesd' => (method => 'POST') => begin
<p><h2>
% if ( $hos_datas->{trt} eq "ADD" ) {
%=l 'hos_CREATE_TITLE'
% } else {
%=l 'hos_MODIFY_TITLE'
% $btn = l('MODIFY');
% }
</h2></p>
%= form_for '/hostentriesd' => ( method => 'POST' ) => begin
<p><h2>
% if ( $hos_datas->{trt} eq "ADD" ) {
%= l 'hos_CREATE_TITLE'
% } else {
%= l 'hos_MODIFY_TITLE'
% $btn = l('MODIFY');
% }
</h2></p>
<p>
%=l 'hos_HOSTNAME_DESCRIPTION'
</p>
<p>
%= l 'hos_HOSTNAME_DESCRIPTION'
</p>
<p>
<span class=label>
%=l 'hos_HOSTNAME', class => 'label'
</span><span class=data>
% if ( $hos_datas->{trt} eq "ADD" ) {
% param 'Name' => $hos_datas->{name} unless param 'Name';
%= text_field 'Name', class => 'input'
% } else {
%= hidden_field 'Name' => $hos_datas->{name}
%= $hos_datas->{name}, class => 'data'
% }
</span>
</p>
<p>
<span class=label>
%= l 'hos_HOSTNAME', class => 'label'
</span><span class=data>
% if ( $hos_datas->{trt} eq "ADD" ) {
% param 'Name' => $hos_datas->{name} unless param 'Name';
%= text_field 'Name', class => 'input'
% } else {
%= hidden_field 'Name' => $hos_datas->{name}
%= $hos_datas->{name}, class => 'data'
% }
</span>
</p>
<p>
<span class=label>
%=l 'DOMAIN', class => 'label'
</span><span class=data>
% if ( $hos_datas->{trt} eq "ADD" ) {
% param 'Domain' => $hos_datas->{domain} unless param 'Domain';
%= select_field 'Domain', $c->domains_list(), class => 'input'
% } else {
%= hidden_field 'Domain' => $hos_datas->{domain}
%= $hos_datas->{domain}, class => 'data'
% }
</span>
</p>
<p>
<span class=label>
%= l 'DOMAIN', class => 'label'
</span><span class=data>
% if ( $hos_datas->{trt} eq "ADD" ) {
% param 'Domain' => $hos_datas->{domain} unless param 'Domain';
%= select_field 'Domain', $c->domains_list(), class => 'input'
% } else {
%= hidden_field 'Domain' => $hos_datas->{domain}
%= $hos_datas->{domain}, class => 'data'
% }
</span>
</p>
<p>
<span class=label>
%= $c->l('COMMENT', '');
</span><span class=data>
% param 'Comment' => $hos_datas->{comment} unless param 'Comment';
%= text_field 'Comment', class => 'input'
</span>
</p>
<p>
<span class=label>
%= $c->l( 'COMMENT', '' );
</span><span class=data>
% param 'Comment' => $hos_datas->{comment} unless param 'Comment';
%= text_field 'Comment', class => 'input'
</span>
</p>
<p>
<span class=label>
%=l 'LOCATION', class => 'label'
</span><span class=data>
% param 'Hosttype' => $hos_datas->{hosttype} unless param 'Hosttype';
%= select_field 'Hosttype', $c->hosttype_list(), class => 'input'
</span>
</p>
<p>
<span class=label>
%= l 'LOCATION', class => 'label'
</span><span class=data>
% param 'Hosttype' => $hos_datas->{hosttype} unless param 'Hosttype';
%= select_field 'Hosttype', $c->hosttype_list(), class => 'input'
</span>
</p>
<p><br>
%= submit_button "$btn", class => 'action'
</p>
<p><br>
%= submit_button "$btn", class => 'action'
</p>
%= hidden_field 'trt' => $hos_datas->{trt}
%= hidden_field 'Hostname' => $hos_datas->{hostname}
%= hidden_field 'Internalip' => $hos_datas->{internalip}
%= hidden_field 'Externalip' => $hos_datas->{externalip}
%= hidden_field 'Macaddress' => $hos_datas->{macaddress}
%= hidden_field 'trt' => $hos_datas->{trt}
%= hidden_field 'Hostname' => $hos_datas->{hostname}
%= hidden_field 'Internalip' => $hos_datas->{internalip}
%= hidden_field 'Externalip' => $hos_datas->{externalip}
%= hidden_field 'Macaddress' => $hos_datas->{macaddress}
%end
% end
</div>

View File

@@ -1,37 +1,37 @@
<div id='hos_urm'>
<!-- UPDATE HOST TYPE -->
<!-- UPDATE HOST TYPE -->
% my $btn = l('MODIFY');
% my $btn = l('MODIFY');
%= form_for '/hostentriesd' => (method => 'POST') => begin
%= form_for '/hostentriesd' => ( method => 'POST' ) => begin
<p>
%=l 'hos_REMOTE_PAGE_DESCRIPTION'
</p>
<p>
%= l 'hos_REMOTE_PAGE_DESCRIPTION'
</p>
<p>
<span class=label>
%=l 'IP_ADDRESS_OR_FQDN', class => 'label'
</span><span class=data>
% param 'Externalip' => $hos_datas->{externalip} unless param 'Externalip';
%= text_field 'Externalip', class => 'input'
</span>
</p>
<p>
<span class=label>
%= l 'IP_ADDRESS_OR_FQDN', class => 'label'
</span><span class=data>
% param 'Externalip' => $hos_datas->{externalip} unless param 'Externalip';
%= text_field 'Externalip', class => 'input'
</span>
</p>
<p><br>
%= submit_button "$btn", class => 'action'
</p>
<p><br>
%= submit_button "$btn", class => 'action'
</p>
%= hidden_field 'trt' => $hos_datas->{trt}
%= hidden_field 'Hostname' => $hos_datas->{hostname}
%= hidden_field 'Name' => $hos_datas->{name}
%= hidden_field 'Domain' => $hos_datas->{domain}
%= hidden_field 'Comment'=> $hos_datas->{comment}
%= hidden_field 'Hosttype'=> $hos_datas->{hosttype}
%= hidden_field 'Internalip' => $hos_datas->{internalip}
%= hidden_field 'Macaddress' => $hos_datas->{macaddress}
%end
%= hidden_field 'trt' => $hos_datas->{trt}
%= hidden_field 'Hostname' => $hos_datas->{hostname}
%= hidden_field 'Name' => $hos_datas->{name}
%= hidden_field 'Domain' => $hos_datas->{domain}
%= hidden_field 'Comment' => $hos_datas->{comment}
%= hidden_field 'Hosttype' => $hos_datas->{hosttype}
%= hidden_field 'Internalip' => $hos_datas->{internalip}
%= hidden_field 'Macaddress' => $hos_datas->{macaddress}
% end
</div>

View File

@@ -1,22 +1,22 @@
<div id='iba_del'>
% my $btn = l('REMOVE');
%= form_for '/ibaysd' => (method => 'POST') => begin
<p>
<h2>
%=l 'iba_REMOVE_TITLE'
</h2>
<br>
%= $c->render_to_string(inline => l('iba_REMOVE_DESC', $iba_datas->{ibay}, $iba_datas->{description}));
<br>
</p>
<p>
%= submit_button "$btn", class => 'action'
</p>
% my $btn = l('REMOVE');
%= form_for '/ibaysd' => ( method => 'POST' ) => begin
<p>
<h2>
%= l 'iba_REMOVE_TITLE'
</h2>
<br>
%= $c->render_to_string( inline => l( 'iba_REMOVE_DESC', $iba_datas->{ibay}, $iba_datas->{description} ) );
<br>
</p>
<p>
%= submit_button "$btn", class => 'action'
</p>
%= hidden_field 'trt' => $iba_datas->{trt}
%= hidden_field 'ibay' => $iba_datas->{ibay}
%= hidden_field 'trt' => $iba_datas->{trt}
%= hidden_field 'ibay' => $iba_datas->{ibay}
% end
% end
</div>

View File

@@ -1,111 +1,111 @@
<div id='iba_list'>
% my $btn = l('iba_ADD_IBAY');
% my $btn = l('iba_ADD_IBAY');
%= form_for '/ibays' => (method => 'POST') => begin
%= form_for '/ibays' => ( method => 'POST' ) => begin
<p>
<br>
%= submit_button "$btn", class => 'action'
</p>
<p>
<br>
%= submit_button "$btn", class => 'action'
</p>
%= hidden_field 'trt' => 'ADD';
% end
% end
<p>
%=l 'iba_FIRSTPAGE_DESC'
<br><br>
</p>
% my $numIbays = @$ibays;
% if ($numIbays == 0){
%=l 'iba_NO_IBAYS'
% } else {
<table class="sme-border TableSort"><thead>
<tr>
<th class='sme-border'>
%=l 'NAME'
</th>
<th class='sme-border'>
%=l 'DESCRIPTION'
</th>
<th class='sme-border'>
%=l 'ACTION'
</th>
</tr>
</thead><tbody>
% foreach my $ibay (@$ibays)
% {
% my $modifiable = $ibay->prop('Modifiable') || 'yes';
% my $passwordable = $ibay->prop('Passwordable') || 'yes';
% my $removable = $ibay->prop('Removable') || 'yes';
% my $needPassword = grep { $_ eq $ibay->prop('PublicAccess') }
% qw(local-pw global-pw global-pw-remote);
<p>
%= l 'iba_FIRSTPAGE_DESC'
<br><br>
</p>
% my $numIbays = @$ibays;
% if ($numIbays == 0){
%= l 'iba_NO_IBAYS'
% } else {
<table class="sme-border TableSort"><thead>
<tr>
<th class='sme-border'>
%= l 'NAME'
</th>
<th class='sme-border'>
%= l 'DESCRIPTION'
</th>
<th class='sme-border'>
%= l 'ACTION'
</th>
</tr>
</thead><tbody>
% foreach my $ibay (@$ibays)
% {
% my $modifiable = $ibay->prop('Modifiable') || 'yes';
% my $passwordable = $ibay->prop('Passwordable') || 'yes';
% my $removable = $ibay->prop('Removable') || 'yes';
% my $needPassword = grep { $_ eq $ibay->prop('PublicAccess') }
% qw(local-pw global-pw global-pw-remote);
<tr>
%= t td => (class => 'sme-border') => $ibay->key
%= t td => (class => 'sme-border') => $ibay->prop('Name')
<td class='sme-border' style="min-width:15em">
%my ($actionModify, $actionResetPw, $actionRemove) = '&nbsp;';
%if ($modifiable eq 'yes') {
%my $modify_text = l('MODIFY'); # Localized text
%my $csrf_token = "TOKEN"; # CSRF token for security
%my $ibays_entry_name = $ibay->key; # ibays_entry name extracted from the data structure
%$actionModify = qq{
% <a href="ibaysd?CsrfDef=$csrf_token&trt=UPD&ibay=$ibays_entry_name">
% <button type='button' class='sme-modify-button' title='$modify_text' >
% $modify_text
% </button>
% </a>
%};
%}
%if ($passwordable eq 'yes') {
%my $password_text = l('PASSWORD_RESET'); # Localized text
%my $csrf_token = "TOKEN"; # CSRF token for security
%my $ibays_entry_name = $ibay->key; # ibays_entry name extracted from the data structure
%if ($ibay->prop('PasswordSet') ne 'yes' && $needPassword) {
%$actionResetPw = qq{
% <a href="ibaysd?CsrfDef=$csrf_token&trt=PWD&ibay=$ibays_entry_name">
% <button type='button' class='sme-password-button unset' title="$password_text - currently unset" style = background:pink; >
% $password_text
% </button>
% </a>
%};
%} else {
%$actionResetPw = qq{
% <a href="ibaysd?CsrfDef=$csrf_token&trt=PWD&ibay=$ibays_entry_name">
% <button type='button' class='sme-password-button' title='$password_text' >
% $password_text
% </button>
% </a>
%};
%}
%}
%= t td => ( class => 'sme-border' ) => $ibay->key
%= t td => ( class => 'sme-border' ) => $ibay->prop('Name')
<td class='sme-border' style="min-width:15em">
% my ( $actionModify, $actionResetPw, $actionRemove ) = '&nbsp;';
% if ($modifiable eq 'yes') {
% my $modify_text = l('MODIFY'); # Localized text
% my $csrf_token = "TOKEN"; # CSRF token for security
% my $ibays_entry_name = $ibay->key; # ibays_entry name extracted from the data structure
% $actionModify = qq{
% <a href="ibaysd?CsrfDef=$csrf_token&trt=UPD&ibay=$ibays_entry_name">
% <button type='button' class='sme-modify-button' title='$modify_text' >
% $modify_text
% </button>
% </a>
% };
% }
%if ($removable eq 'yes') {
%my $remove_text = l('REMOVE'); # Localized text
%my $csrf_token = "TOKEN"; # CSRF token for security
%my $ibays_entry_name = $ibay->key; # ibays_entry name extracted from the data structure
%$actionRemove = qq{
% <a href="ibaysd?CsrfDef=$csrf_token&trt=DEL&ibay=$ibays_entry_name">
% <button type='button' class='sme-remove-button' title='$remove_text' >
% $remove_text
% </button>
% </a>
%};
%}
<%= $c->render_to_string(inline => $actionModify) %>
<%= $c->render_to_string(inline => $actionResetPw)%>
<%= $c->render_to_string(inline => $actionRemove) %>
</td>
</tr>
% }
</tbody>
</table>
<%} %>
% if ($passwordable eq 'yes') {
% my $password_text = l('PASSWORD_RESET'); # Localized text
% my $csrf_token = "TOKEN"; # CSRF token for security
% my $ibays_entry_name = $ibay->key; # ibays_entry name extracted from the data structure
% if ($ibay->prop('PasswordSet') ne 'yes' && $needPassword) {
% $actionResetPw = qq{
% <a href="ibaysd?CsrfDef=$csrf_token&trt=PWD&ibay=$ibays_entry_name">
% <button type='button' class='sme-password-button unset' title="$password_text - currently unset" style = background:pink; >
% $password_text
% </button>
% </a>
% };
% } else {
% $actionResetPw = qq{
% <a href="ibaysd?CsrfDef=$csrf_token&trt=PWD&ibay=$ibays_entry_name">
% <button type='button' class='sme-password-button' title='$password_text' >
% $password_text
% </button>
% </a>
% };
% }
% }
% if ($removable eq 'yes') {
% my $remove_text = l('REMOVE'); # Localized text
% my $csrf_token = "TOKEN"; # CSRF token for security
% my $ibays_entry_name = $ibay->key; # ibays_entry name extracted from the data structure
% $actionRemove = qq{
% <a href="ibaysd?CsrfDef=$csrf_token&trt=DEL&ibay=$ibays_entry_name">
% <button type='button' class='sme-remove-button' title='$remove_text' >
% $remove_text
% </button>
% </a>
% };
% }
<%= $c->render_to_string( inline => $actionModify ) %>
<%= $c->render_to_string( inline => $actionResetPw ) %>
<%= $c->render_to_string( inline => $actionRemove ) %>
</td>
</tr>
% }
</tbody>
</table>
<% } %>
</div>

View File

@@ -1,42 +1,42 @@
<div id='iba_net'>
% my $btn = l('SAVE');
% my $btn = l('SAVE');
%= form_for '/ibaysd' => (method => 'POST') => begin
<p>
<h2>
%=l 'PASSWORD_RESET'
</h2>
<br><br>
%=l 'iba_PASSWORD_DESC'
%= $iba_datas->{ibay}
</p>
<p>
<span class=label>
%=l 'PASSWORD_NEW', class => 'label'
</span><span class=data>
%= password_field 'newPass', class => 'input' , class=>'sme-password'
</span>
</p>
%= form_for '/ibaysd' => ( method => 'POST' ) => begin
<p>
<h2>
%= l 'PASSWORD_RESET'
</h2>
<p>
<span class=label>
%=l 'PASSWORD_VERIFY_NEW', class => 'label'
</span><span class=data>
%= password_field 'newPassVerify', class => 'input', class=>'sme-password'
</span>
</p>
<br><br>
%= l 'iba_PASSWORD_DESC'
%= $iba_datas->{ibay}
</p>
<p>
<br><br>
%= submit_button "$btn", class => 'action'
</p>
<p>
<span class=label>
%= l 'PASSWORD_NEW', class => 'label'
</span><span class=data>
%= password_field 'newPass', class => 'input', class => 'sme-password'
</span>
</p>
%= hidden_field 'trt' => $iba_datas->{trt}
%= hidden_field 'ibay' => $iba_datas->{ibay}
% end
<p>
<span class=label>
%= l 'PASSWORD_VERIFY_NEW', class => 'label'
</span><span class=data>
%= password_field 'newPassVerify', class => 'input', class => 'sme-password'
</span>
</p>
</div>
<p>
<br><br>
%= submit_button "$btn", class => 'action'
</p>
%= hidden_field 'trt' => $iba_datas->{trt}
%= hidden_field 'ibay' => $iba_datas->{ibay}
% end
</div>

View File

@@ -1,101 +1,101 @@
<div id='iba_upd'>
% my $btn = l('ADD');
% my $btn = l('ADD');
%= form_for '/ibaysd' => (method => 'POST') => begin
<p>
<h2>
%=l 'iba_ADD_TITLE'
</h2>
<br>
%=l 'iba_NAME_FIELD_DESC'
</p>
%= form_for '/ibaysd' => ( method => 'POST' ) => begin
<p>
<h2>
%= l 'iba_ADD_TITLE'
</h2>
<br>
%= l 'iba_NAME_FIELD_DESC'
</p>
<p>
<span class=label>
%=l 'iba_NAME_LABEL', class => 'label'
</span><span class=data>
% if ( $iba_datas->{trt} eq 'ADD' ) {
% param 'ibay' => $iba_datas->{ibay} unless param 'ibay';
%= text_field 'ibay', class => 'input'
% } else {
% $btn = l('SAVE');
%= $iba_datas->{ibay}, class => 'data'
% }
</span>
</p>
<p>
<span class=label>
%= l 'iba_NAME_LABEL', class => 'label'
</span><span class=data>
% if ( $iba_datas->{trt} eq 'ADD' ) {
% param 'ibay' => $iba_datas->{ibay} unless param 'ibay';
%= text_field 'ibay', class => 'input'
% } else {
% $btn = l('SAVE');
%= $iba_datas->{ibay}, class => 'data'
% }
</span>
</p>
<p>
<span class=label>
%=l 'DESCRIPTION', class => 'label'
</span><span class=data>
% param 'ibayDesc' => $iba_datas->{description} unless param 'ibayDesc';
%= text_field 'ibayDesc', class => 'input'
</span>
</p>
<p>
<span class=label>
%= l 'DESCRIPTION', class => 'label'
</span><span class=data>
% param 'ibayDesc' => $iba_datas->{description} unless param 'ibayDesc';
%= text_field 'ibayDesc', class => 'input'
</span>
</p>
<p>
<span class=label>
%=l 'GROUP'
</span><span class=data>
% param 'group' => $iba_datas->{group} unless param 'group';
%= select_field 'group' => $c->group_list_m(), class => 'input'
<br>
</span>
</p>
<p>
<span class=label>
%= l 'GROUP'
</span><span class=data>
% param 'group' => $iba_datas->{group} unless param 'group';
%= select_field 'group' => $c->group_list_m(), class => 'input'
<br>
</span>
</p>
<p>
<span class=label>
%=l 'iba_USER_ACCESS'
</span><span class=data>
% param 'userAccess' => $iba_datas->{userAccess} unless param 'userAccess';
%= select_field 'userAccess' => $c->userAccess_list_m(), class => 'input'
<br>
</span>
</p>
<p>
<span class=label>
%= l 'iba_USER_ACCESS'
</span><span class=data>
% param 'userAccess' => $iba_datas->{userAccess} unless param 'userAccess';
%= select_field 'userAccess' => $c->userAccess_list_m(), class => 'input'
<p>
<span class=label>
%=l 'iba_PUBLIC_ACCESS'
</span><span class=data>
% param 'publicAccess' => $iba_datas->{publicAccess} unless param 'publicAccess';
%= select_field 'publicAccess' => $c->publicAccess_list_m(), class => 'input'
<br>
</span>
</p>
<br>
</span>
</p>
<p>
<span class=label>
%=l 'iba_ALLOW_DYNAMIC_CONTENT'
</span><span class=data>
% param 'CgiBin' => $iba_datas->{CgiBin} unless param 'CgiBin';
%= select_field 'CgiBin' => [[ (l 'DISABLED') => 'disabled'], [ (l 'ENABLED') => 'enabled']], class => 'input'
<br>
</span>
</p>
<p>
<span class=label>
%= l 'iba_PUBLIC_ACCESS'
</span><span class=data>
% param 'publicAccess' => $iba_datas->{publicAccess} unless param 'publicAccess';
%= select_field 'publicAccess' => $c->publicAccess_list_m(), class => 'input'
<br>
</span>
</p>
<p>
<span class=label>
%=l 'iba_HTTPS_Only'
</span><span class=data>
% param 'SSL' => $iba_datas->{SSL} unless param 'SSL';
%= select_field 'SSL' => [[ (l 'DISABLED') => 'disabled'], [ (l 'ENABLED') => 'enabled']], class => 'input'
<br>
</span>
</p>
<p>
<span class=label>
%= l 'iba_ALLOW_DYNAMIC_CONTENT'
</span><span class=data>
% param 'CgiBin' => $iba_datas->{CgiBin} unless param 'CgiBin';
%= select_field 'CgiBin' => [ [ ( l 'DISABLED' ) => 'disabled' ], [ ( l 'ENABLED' ) => 'enabled' ] ], class => 'input';
<br>
</span>
</p>
<p>
<br><br>
%= submit_button $btn, class => 'action'
</p>
<p>
<span class=label>
%= l 'iba_HTTPS_Only'
</span><span class=data>
% param 'SSL' => $iba_datas->{SSL} unless param 'SSL';
%= select_field 'SSL' => [ [ ( l 'DISABLED' ) => 'disabled' ], [ ( l 'ENABLED' ) => 'enabled' ] ], class => 'input';
<br>
</span>
</p>
%= hidden_field 'trt' => $iba_datas->{trt}
% if ( $iba_datas->{trt} eq 'UPD' ) {
%= hidden_field 'ibay' => $iba_datas->{ibay}
% }
% end
<p>
<br><br>
%= submit_button $btn, class => 'action'
</p>
%= hidden_field 'trt' => $iba_datas->{trt}
% if ( $iba_datas->{trt} eq 'UPD' ) {
%= hidden_field 'ibay' => $iba_datas->{ibay}
% }
% end
</div>

View File

@@ -1,25 +1,25 @@
<% use POSIX qw(strftime); %>
<% use POSIX qw(strftime); %>
<div id="info">
<% if (! $c->session->{PwdSet} ) { %>
<div class="sme-error module"><h5>
<% if (! $c->session->{PwdSet} ) { %>
<div class="sme-error module"><h5>
Warning: you have not yet changed the default system password.</h5></div>
<% } %>
<% if ( $c->is_unsafe ) { %>
<div class="sme-error module"><h5>
<% } %>
<% if ( $c->is_unsafe && $c->is_logged_in && $c->is_admin) { %>
<div class="sme-error module"><h5>
Warning: a reconfigure and reboot is required before proceeding! Failure to do so now
may leave your system in an unknown state!</h5></div>
<% } %>
<% if ( $c->session->{Access} eq 'public' && ((config->{debug} ne '0') || (config->{mode} ne 'production')) ) { %>
<div class="sme-error module"><h5>
<% } %>
<% if ( $c->session->{Access} eq 'public' && ((config->{debug} ne '0') || (config->{mode} ne 'production')) ) { %>
<div class="sme-error module"><h5>
Warning: Development or debug mode enabled AND public access is offered !
</h5></div>
<% } %>
<% my $curdate = strftime '%Y%m%d', localtime; %>
<% if ( "$curdate" >= "20290531" ) { %>
<div class="sme-error"><h5>
URGENT NOTICE: As per May 31st 2029, SME Server 11 is obsolete, and potentially INSECURE. NO support will be offered for any issue found with this installed version.
Please migrate IMMEDIATELY to Koozali SME Server 12 or higher version. Failure to upgrade may lead to the compromise of this server.
</h5></div>
<% } %>
<% my $curdate = strftime '%Y%m%d', localtime; %>
<% if ( "$curdate" >= "20290531" ) { %>
<div class="sme-error"><h5>
URGENT NOTICE: As per May 31st 2029, SME Server 11 is obsolete, and potentially INSECURE. NO support will be offered for any issue found with this installed version.
Please migrate IMMEDIATELY to Koozali SME Server 12 or higher version. Failure to upgrade may lead to the compromise of this server.
</br>Please, consult <a href="https://wiki.koozali.org/SME_Server:Download" target="_blank">https://wiki.koozali.org/SME_Server:Download</a> to get the latest version
</h5></div>
<% } %>
</h5></div>
<% } %>
</div>

View File

@@ -4,21 +4,21 @@
% content_for 'js_togglePassword' => begin
%= javascript begin
$(document).ready(function() {
$(document).ready(function() {
const togglePassword = document.querySelector('#togglePassword');
const password = document.querySelector('#id_password');
if (( togglePassword ) && ( password )) {
togglePassword.addEventListener('click', function (e) {
// toggle the type attribute
const type = password.getAttribute('type') === 'password' ? 'text' : 'password';
password.setAttribute('type', type);
// toggle the eye slash icon
// this.classList.toggle('eye-slash');
})
togglePassword.addEventListener('click', function (e) {
// toggle the type attribute
const type = password.getAttribute('type') === 'password' ? 'text' : 'password';
password.setAttribute('type', type);
// toggle the eye slash icon
// this.classList.toggle('eye-slash');
})
}
});
});
% end
% end
@@ -30,34 +30,34 @@
%= javascript begin
$(document).ready(function() {
$('#tognav').click(function() {
//alert('click1:'+window.localStorage.getItem('menunav'));
window.localStorage.setItem('menunav',!$('#menunav').is(':visible'));
//alert('click2:'+window.localStorage.getItem('menunav'));
$('#menunav').toggle({ duration: 300 });
});
$('#tognav').click(function() {
//alert('click1:'+window.localStorage.getItem('menunav'));
window.localStorage.setItem('menunav',!$('#menunav').is(':visible'));
//alert('click2:'+window.localStorage.getItem('menunav'));
$('#menunav').toggle({ duration: 300 });
});
$('#toguser').click(function() {
window.localStorage.setItem('menuuser',!$('#menuuser').is(':visible'));
$('#menuuser').toggle({ duration: 300 });
});
$('#toguser').click(function() {
window.localStorage.setItem('menuuser',!$('#menuuser').is(':visible'));
$('#menuuser').toggle({ duration: 300 });
});
$('#togadm').click(function() {
window.localStorage.setItem('menuadm',!$('#menuadm').is(':visible'));
$('#menuadm').toggle({ duration: 300 });
});
$('#togadm').click(function() {
window.localStorage.setItem('menuadm',!$('#menuadm').is(':visible'));
$('#menuadm').toggle({ duration: 300 });
});
$('.section-title').click(function() {
var $section = $(this).parent().next('div');
if(!$section.length){
return false;
}
let localStorageTag = "admSection-"+this.innerHTML;
var jqObj = $($section);
window.localStorage.setItem(localStorageTag,!jqObj.is(':visible'));
$section.toggle({ duration: 600 });
})
$('.section-title').click(function() {
var $section = $(this).parent().next('div');
if(!$section.length){
return false;
}
let localStorageTag = "admSection-"+this.innerHTML;
var jqObj = $($section);
window.localStorage.setItem(localStorageTag,!jqObj.is(':visible'));
$section.toggle({ duration: 600 });
})
});
% end
@@ -67,35 +67,35 @@
% content_for 'js_swapClass' => begin
%= javascript begin
(function($) {
$.fn.swapClass = function(class1, class2) {
this.each(function() {
var $elem = $(this);
if ($elem.hasClass(class1)) {
$elem.removeClass(class1).addClass(class2);
}
else if ($elem.hasClass(class2)) {
$elem.removeClass(class2).addClass(class1);
}
});
};
})(jQuery);
(function($) {
$.fn.swapClass = function(class1, class2) {
this.each(function() {
var $elem = $(this);
if ($elem.hasClass(class1)) {
$elem.removeClass(class1).addClass(class2);
}
else if ($elem.hasClass(class2)) {
$elem.removeClass(class2).addClass(class1);
}
});
};
})(jQuery);
$(document).ready(function() {
$('a.item-current').swapClass('item-current','item');
$('a.item-current').swapClass('item-current','item');
var pathname = $(location).attr('pathname');
var pathname = $(location).attr('pathname');
//alert('jQuery loaded. Path searched: ' + pathname);
//alert('jQuery loaded. Path searched: ' + pathname);
var menus = $('a.item');
$.each(menus, function() {
if ( $(this).attr('href') == pathname ) {
$(this).swapClass('item', 'item-current');
// alert('menu found! ' + $(this).attr('href') + ' ' + $(this).attr('class'));
}
})
var menus = $('a.item');
$.each(menus, function() {
if ( $(this).attr('href') == pathname ) {
$(this).swapClass('item', 'item-current');
// alert('menu found! ' + $(this).attr('href') + ' ' + $(this).attr('class'));
}
})
});
});
% end
% end
% end

View File

@@ -1,67 +1,67 @@
<div id='ln_add'>
% my $retref= $c->stash("ret");
% my %ret = $retref ? %$retref : (ret => "");
% my @vars = split(/,/, $ret{vars} // '');
% my ($var1, $var2, $var3, $var4, $var5, $var6, $var7) = @vars;
% my $retref = $c->stash("ret");
% my %ret = $retref ? %$retref : ( ret => "" );
% my @vars = split( /,/, $ret{vars} // '' );
% my ( $var1, $var2, $var3, $var4, $var5, $var6, $var7 ) = @vars;
% if ($c->app->config->{debug}) {
<p>
%= dumper { ret_data => \%ret }
</p>
% }
% if ($c->app->config->{debug}) {
<p>
%= dumper { ret_data => \%ret }
</p>
% }
% if ($ret{ret} eq "") {
%=l "ln_FIRSTPAGE_DESC"
% } elsif (index($ret{ret},"SUCCESS") != -1) {
<br>
<div class='success'>
%= $c->render_to_string(inline => l($ret{ret}, @vars[0..6]))
</div>
% } else {
<br>
<div class='sme-error'>
%= $c->render_to_string(inline => l($ret{ret}, @vars[0..6]))
</div>
% }
<br />
% my $btn = l('ADD');
% my $network_db = esmith::NetworksDB::UTF8->open() || die "Couldn't open NetworksDB db";
% if ($ret{ret} eq "") {
%= l "ln_FIRSTPAGE_DESC"
% } elsif (index($ret{ret},"SUCCESS") != -1) {
<br>
<div class='success'>
%= $c->render_to_string( inline => l( $ret{ret}, @vars[ 0 .. 6 ] ) )
</div>
% } else {
<br>
<div class='sme-error'>
%= $c->render_to_string( inline => l( $ret{ret}, @vars[ 0 .. 6 ] ) )
</div>
% }
<br />
% my $btn = l('ADD');
% my $network_db = esmith::NetworksDB::UTF8->open() || die "Couldn't open NetworksDB db";
% if (config->{debug} == 1) {
<p>
%= dumper $c->current_route
%= dumper $c->stash("ret")
</p>
% }
% if (config->{debug} == 1) {
<p>
%= dumper $c->current_route
%= dumper $c->stash("ret")
</p>
% }
%= form_for '/localnetworksb' => (method => 'POST') => begin
<h2>
%=l "ln_ADD_TITLE"
</h2>
<p>
%= $c->render_to_string(inline => l('ln_ADD_DESC'));
</p><br>
<span class=label>
%=l "NETWORK"
</span><span class=data>
%=text_field 'networkAddress'
</span><br><br>
<span class=label>
%=l "ln_SUBNET_MASK"
</span><span class=data>
%=text_field 'networkMask'
</span><br><br>
<span class=label>
%=l "ROUTER"
</span>
<span class=data>
%=text_field 'networkRouter'
</span><br><br>
<p>
<br>
%= submit_button "$btn", class => 'action'
</p>
%end
%= form_for '/localnetworksb' => ( method => 'POST' ) => begin
<h2>
%= l "ln_ADD_TITLE"
</h2>
<p>
%= $c->render_to_string( inline => l('ln_ADD_DESC') );
</p><br>
<span class=label>
%= l "NETWORK"
</span><span class=data>
%= text_field 'networkAddress'
</span><br><br>
<span class=label>
%= l "ln_SUBNET_MASK"
</span><span class=data>
%= text_field 'networkMask'
</span><br><br>
<span class=label>
%= l "ROUTER"
</span>
<span class=data>
%= text_field 'networkRouter'
</span><br><br>
<p>
<br>
%= submit_button "$btn", class => 'action'
</p>
% end
</div>
</div>

View File

@@ -1,59 +1,59 @@
<div id='ln_del'>
% my $btn = l('REMOVE');
% my $deletehosts = $ln_datas->{deletehosts};
% my $subnet = $ln_datas->{subnet};
% my $router = $ln_datas->{router};
% if (config->{debug} == 1) {
<p>
%= dumper $c->current_route
%= dumper $c->stash("ret")
%= dumper %$ln_datas
%= dumper $deletehosts
</p>
% }
%= form_for '/localnetworkse' => (method => 'POST') => begin
<h2>
%=l "ln_REMOVE_TITLE"
</h2>
<p>
%=l "ln_REMOVE_DESC"
</p><br>
<span class=label>
%=l "NETWORK"
</span><span class=data>
%=$localnetwork
</span><br><br>
<span class=label>
%=l "ln_SUBNET_MASK"
</span><span class=data>
%= $subnet
</span><br><br>
<span class=label>
%=l "ROUTER"
</span>
<span class=data>
%= $router
</span><br><br>
% if($deletehosts) {
<br>
%=$c->l("ln_REMOVE_HOSTS_DESC")
<br>
<span class=label>
%= $c->l("ln_REMOVE_HOSTS_LABEL")
</span>
<span class= data>
%=check_box deletehost=>1, checked=>1
</span><br><br>
%}
%= hidden_field localnetwork=>$localnetwork
<p>
<br>
%= submit_button "$btn", class => 'action'
</p>
% my $btn = l('REMOVE');
% my $deletehosts = $ln_datas->{deletehosts};
% my $subnet = $ln_datas->{subnet};
% my $router = $ln_datas->{router};
%end
% if (config->{debug} == 1) {
<pre>
%= dumper $c->current_route
%= dumper $c->stash("ret")
%= dumper %$ln_datas
%= dumper $deletehosts
</pre>
% }
%= form_for '/localnetworkse' => ( method => 'POST' ) => begin
<h2>
%= l "ln_REMOVE_TITLE"
</h2>
<p>
%= l "ln_REMOVE_DESC"
</p><br>
<span class=label>
%= l "NETWORK"
</span><span class=data>
%= $localnetwork
</span><br><br>
<span class=label>
%= l "ln_SUBNET_MASK"
</span><span class=data>
%= $subnet
</span><br><br>
<span class=label>
%= l "ROUTER"
</span>
<span class=data>
%= $router
</span><br><br>
% if($deletehosts) {
<br>
%= $c->l("ln_REMOVE_HOSTS_DESC")
<br>
<span class=label>
%= $c->l("ln_REMOVE_HOSTS_LABEL")
</span>
<span class= data>
%= check_box deletehost => 1, checked => 1
</span><br><br>
% }
%= hidden_field localnetwork => $localnetwork
<p>
<br>
%= submit_button "$btn", class => 'action'
</p>
% end
</div>

View File

@@ -1,97 +1,97 @@
<div id='ln_list'>
% my $btn = l('ln_LOCALNETWORK_ADD');
%= form_for '/localnetworksa' => (method => 'POST') => begin
% my $btn = l('ln_LOCALNETWORK_ADD');
%= form_for '/localnetworksa' => ( method => 'POST' ) => begin
% my $retref= $c->stash("ret");
% my %ret = $retref ? %$retref : (ret => "");
% my @vars = split(/,/, $ret{vars} // '');
% my ($var1, $var2, $var3, $var4, $var5, $var6, $var7) = @vars;
% my $retref = $c->stash("ret");
% my %ret = $retref ? %$retref : ( ret => "" );
% my @vars = split( /,/, $ret{vars} // '' );
% my ( $var1, $var2, $var3, $var4, $var5, $var6, $var7 ) = @vars;
% if ($c->app->config->{debug}) {
<p>
% if ($c->app->config->{debug}) {
<pre>
%= dumper { ret_data => \%ret }
</p>
% }
</pre>
% }
% if ($ret{ret} eq "") {
%=l "ln_FIRSTPAGE_DESC"
% } elsif (index($ret{ret},"SUCCESS") != -1) {
<br>
<div class='success'>
%= $c->render_to_string(inline => l($ret{ret}, @vars[0..6]))
</div>
% } else {
<br>
<div class='sme-error'>
%= $c->render_to_string(inline => l($ret{ret}, @vars[0..6]))
</div>
% }
% if ($ret{ret} eq "") {
%= l "ln_FIRSTPAGE_DESC"
% } elsif (index($ret{ret},"SUCCESS") != -1) {
<br>
<div class='success'>
%= $c->render_to_string( inline => l( $ret{ret}, @vars[ 0 .. 6 ] ) )
</div>
% } else {
<br>
<div class='sme-error'>
%= $c->render_to_string( inline => l( $ret{ret}, @vars[ 0 .. 6 ] ) )
</div>
% }
<p>
<br>
%= submit_button "$btn", class => 'action'
</p>
<p>
<br>
%= submit_button "$btn", class => 'action'
</p>
% end
% end
<br>
% my $numlocalnetworks = @$localnetworks;
% if ($numlocalnetworks == 0){
%=l 'ln_LOCAL_NETWORK_NONE'
% } else {
<br>
<table class="sme-border TableSort"><thead>
<tr>
<th class='sme-border'>
%=l 'NETWORK'
</th>
<th class='sme-border'>
%=l 'ln_SUBNET_MASK'
</th>
<br>
% my $numlocalnetworks = @$localnetworks;
% if ($numlocalnetworks == 0){
%= l 'ln_LOCAL_NETWORK_NONE'
% } else {
<br>
<table class="sme-border TableSort"><thead>
<tr>
<th class='sme-border'>
%= l 'NETWORK'
</th>
<th class='sme-border'>
%= l 'ln_SUBNET_MASK'
</th>
<th class='sme-border'>
%=l 'ln_NUMBER_OF_HOSTS'
</th>
<th class='sme-border'>
%= l 'ln_NUMBER_OF_HOSTS'
</th>
<th class='sme-border'>
%=l 'ROUTER'
</th>
<th class='sme-border'>
%= l 'ROUTER'
</th>
<th class='sme-border'>
%=l 'ACTION'
</th>
</tr>
</thead><tbody>
% foreach my $localnetwork (@$localnetworks )
% {
% my ($num_hosts) = esmith::util::computeHostRange( $localnetwork->key, $localnetwork->prop('Mask') );
% my $removable = $localnetwork->prop('Removable') || "yes";
% my $system = $localnetwork->prop('SystemLocalNetwork') || "no";
% if ( $system eq "yes" ) { $removable = "no"; }
<tr>
%= t td => (class => 'sme-border') => $localnetwork->key
%= t td => (class => 'sme-border') => $localnetwork->prop('Mask')
%= t td => (class => 'sme-border') => $num_hosts
%= t td => (class => 'sme-border') => $localnetwork->prop('Router')
%my $actionRemove = '&nbsp;';
%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{
% <a href="localnetworksd?CsrfDef=$csrf_token&trt=DEL&localnetwork=$local_network_entry">
% <button type='button' class='sme-remove-button' title='$remove_text' >
% $remove_text
% </button>
% </a>
%};
% }
<td class='sme-border'><%= $c->render_to_string(inline => $actionRemove) %></td>
</tr>
% }
</tbody>
</table>
%= hidden_field 'trt' => $ln_datas->{trt}
%}
</div>
<th class='sme-border'>
%= l 'ACTION'
</th>
</tr>
</thead><tbody>
% foreach my $localnetwork (@$localnetworks)
% {
% my ($num_hosts) = esmith::util::computeHostRange( $localnetwork->key, $localnetwork->prop('Mask') );
% my $removable = $localnetwork->prop('Removable') || "yes";
% my $system = $localnetwork->prop('SystemLocalNetwork') || "no";
% if ( $system eq "yes" ) { $removable = "no"; }
<tr>
%= t td => ( class => 'sme-border' ) => $localnetwork->key
%= t td => ( class => 'sme-border' ) => $localnetwork->prop('Mask')
%= t td => ( class => 'sme-border' ) => $num_hosts
%= t td => ( class => 'sme-border' ) => $localnetwork->prop('Router')
% my $actionRemove = '&nbsp;';
% 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{
% <a href="localnetworksd?CsrfDef=$csrf_token&trt=DEL&localnetwork=$local_network_entry">
% <button type='button' class='sme-remove-button' title='$remove_text' >
% $remove_text
% </button>
% </a>
% };
% }
<td class='sme-border'><%= $c->render_to_string( inline => $actionRemove ) %></td>
</tr>
% }
</tbody>
</table>
%= hidden_field 'trt' => $ln_datas->{trt}
% }
</div>

View File

@@ -0,0 +1,54 @@
%#
%# Generated by SM2Gen version:0.9(20Jan2025) Chameleon version:4.5.4 On Python:3.12.3 at 2025-06-29 08:53:20
%#
<div id="Emailsettings-ACC" class="partial Emailsettings-ACC">
%# <script>
%# window.onload = function() {
%# SelectInput();
%# };
%# </script>
% if (config->{debug} == 1) {
<pre>
%= dumper $mai_data
</pre>
% }
% my $btn = l('SAVE');
% $c->param( Selected => undef ); #This may need deleting for a params panel - only needed for a table
<h2><%= $c->l('mai_DESC_STATE_ACCESS_BUTTON') %></h2><br>
%= form_for "emailsettingsu" => ( method => 'POST' ) => begin
% param 'trt' => $mai_data->{trt} unless param 'trt';
%= hidden_field 'trt' => $mai_data->{trt}
%# Inputs etc in here.
%= l 'mai_DESC_POP_ACCESS_CONTROL'
<p><span class=label>
%= l 'mai_LABEL_POP_ACCESS_CONTROL'
</span><span class=input>
% param 'POPAccess' => $c->get_current_pop3_access() unless param 'POPAccess';
%= select_field 'POPAccess' => $c->get_pop_opt(), class => 'input'
</span></p>
%= l 'mai_DESC_IMAP_ACCESS_CONTROL'
<p><span class=label>
%= l 'mai_LABEL_IMAP_ACCESS_CONTROL'
</span><span class=input>
% param 'IMAPAccess' => $c->get_current_imap_access() unless param 'IMAPAccess';
%= select_field 'IMAPAccess' => $c->get_imap_opt(), class => 'input'
</span></p>
%= l 'mai_DESC_WEBMAIL'
<p><span class=label>
%= l 'mai_LABEL_WEBMAIL'
</span><span class=input>
% param 'WebMail' => $c->get_current_webmail_status() unless param 'WebMail';
%= select_field 'WebMail' => $c->get_webmail_opt(), class => 'input'
</span></p>
%# ....
%# Probably finally by a submit.
%= submit_button $btn, class => 'action'
% end
</div>

View File

@@ -0,0 +1,90 @@
%#
%# Generated by SM2Gen version:0.9(20Jan2025) Chameleon version:4.5.4 On Python:3.12.3 at 2025-06-29 08:53:20
%#
<div id="Emailsettings-DEL" class="partial Emailsettings-DEL">
%# <script>
%# window.onload = function() {
%# SelectInput();
%# };
%# </script>
% if (config->{debug} == 1) {
<pre>
%= dumper $mai_data
</pre>
% }
% my $btn = l('SAVE');
% $c->param( Selected => undef ); #This may need deleting for a params panel - only needed for a table
<h2><%= $c->l('mai_DESC_STATE_DELIVERY_BUTTON') %></h2>
%= form_for "emailsettingsu" => ( method => 'POST' ) => begin
% param 'trt' => $mai_data->{trt} unless param 'trt';
%= hidden_field 'trt' => $mai_data->{trt}
%# Inputs etc in here.
<h2>
%= l 'mai_TITLE_UNKNOWN'
</h2>
%= l 'mai_DESC_UNKNOWN'
<p><span class=label>
%= l 'mai_LABEL_UNKNOWN'
</span><span class=input>
% param 'EmailUnknownUser' => $mai_data->{emailunknownuser} unless param 'EmailUnknownUser';
%= select_field 'EmailUnknownUser' => $c->get_emailunknownuser_opt(), class => 'input'
</span></p>
<!--<hr class='menubar' />-->
<h2>
%= l 'mai_TITLE_DELEGATE'
</h2>
%= l 'mai_DESC_DELEGATE'
<p><span class=label>
%= l 'mai_LABEL_DELEGATE'
</span><span class=input>
% param 'DelegateMailServer' => $mai_data->{delegatemailserver} unless param 'DelegateMailServer';
%= text_field 'DelegateMailServer', class => 'input'
</span></p>
<!--<hr class='sectionbar' />-->
<h2>
%= l 'mai_TITLE_SMARTHOST'
</h2>
%= l 'mai_DESC_SMARTHOST'
<p><span class=label>
%= l 'mai_LABEL_SMARTHOST'
</span><span class=input>
% param 'SMTPSmartHost' => $mai_data->{smtpsmarthost} unless param 'SMTPSmartHost';
%= text_field 'SMTPSmartHost', class => 'input'
</span></p>
<p><span class=label>
%= l 'mai_LABEL_SMARTHOST_SMTPAUTH_STATUS'
</span><span class=input>
% param 'SMTPAUTHPROXY_status' => $mai_data->{smtpauthproxystatus} unless param 'SMTPAUTHPROXY_status';
%= select_field 'SMTPAUTHPROXY_status' => [ [ ( l 'DISABLED' ) => 'disabled' ], [ ( l 'ENABLED' ) => 'enabled' ] ], class => 'input';
</span></p>
<p><span class=label>
%= l 'mai_LABEL_SMARTHOST_SMTPAUTH_USERID'
</span><span class=input>
% param 'SMTPAUTHPROXY_Userid' => $mai_data->{smtpauthproxyuserid} unless param 'SMTPAUTHPROXY_Userid';
%= text_field 'SMTPAUTHPROXY_Userid', class => 'input'
</span></p>
<p><span class=label>
%= l 'mai_LABEL_SMARTHOST_SMTPAUTH_PASSWD'
</span><span class=input>
% param 'SMTPAUTHPROXY_Passwd' => $mai_data->{smtpauthproxypassword} unless param 'SMTPAUTHPROXY_Passwd';
%= password_field 'SMTPAUTHPROXY_Passwd', class => 'input'
</span></p>
%# ....
%# Probably finally by a submit.
%= submit_button $btn, class => 'action'
% end
</div>

View File

@@ -0,0 +1,98 @@
%#
%# Generated by SM2Gen version:0.9(20Jan2025) Chameleon version:4.5.4 On Python:3.12.3 at 2025-06-29 08:53:20
%#
<div id="Emailsettings-FIL" class="partial Emailsettings-FIL">
%# <script>
%# window.onload = function() {
%# SelectInput();
%# };
%# </script>
% if (config->{debug} == 1) {
<pre>
%= dumper $mai_data
</pre>
% }
% my $btn = l('SAVE');
% $c->param( Selected => undef ); #This may need deleting for a params panel - only needed for a table
<h2><%= $c->l('mai_DESC_STATE_FILTERING_BUTTON') %></h2><br>
%= form_for "emailsettingsu" => ( method => 'POST' ) => begin
% param 'trt' => $mai_data->{trt} unless param 'trt';
%= hidden_field 'trt' => $mai_data->{trt}
%# Inputs etc in here.
%= l 'mai_DESC_VIRUS_SCAN'
<p><span class=label>
%= l 'mai_LABEL_VIRUS_SCAN'
</span><span class=input>
% param 'VirusStatus' => $mai_data->{virusstatus} unless param 'VirusStatus';
%= select_field 'VirusStatus' => [ [ ( l 'DISABLED' ) => 'disabled' ], [ ( l 'ENABLED' ) => 'enabled' ] ], class => 'input';
</span><br></p>
%= l 'mai_DESC_SPAM_SCAN'
<p><span class=label>
%= l 'mai_LABEL_SPAM_SCAN'
</span><span class=input>
% param 'Spamstatus' => $mai_data->{spamstatus} unless param 'Spamstatus';
%= select_field 'Spamstatus' => [ [ ( l 'DISABLED' ) => 'disabled' ], [ ( l 'ENABLED' ) => 'enabled' ] ], class => 'input';
</span></p>
<p><span class=label>
%= l 'mai_LABEL_SPAM_SENSITIVITY'
</span><span class=input>
% param 'SpamSensitivity' => $mai_data->{spamsensitivity} unless param 'SpamSensitivity';
%= select_field 'SpamSensitivity' => $c->get_spam_sensitivity_opt(), class => 'input'
</span></p>
<p><span class=label>
%= l 'mai_LABEL_SPAM_TAGLEVEL'
</span><span class=input>
% param 'SpamTagLevel' => $mai_data->{spamtaglevel} unless param 'SpamTagLevel';
%= select_field 'SpamTagLevel' => $c->get_spam_level_options(), class => 'input'
</span></p>
<p><span class=label>
%= l 'mai_LABEL_SPAM_REJECTLEVEL'
</span><span class=input>
% param 'SpamRejectLevel' => $mai_data->{spamrejectlevel} unless param 'SpamRejectLevel';
%= select_field 'SpamRejectLevel' => $c->get_spam_level_options(), class => 'input'
</span></p>
<p><span class=label>
%= l 'mai_LABEL_SORTSPAM'
</span><span class=input>
% param 'SpamSortSpam' => $mai_data->{spamsortspam} unless param 'SpamSortSpam';
%= select_field 'SpamSortSpam' => [ [ ( l 'DISABLED' ) => 'disabled' ], [ ( l 'ENABLED' ) => 'enabled' ] ], class => 'input';
</span></p>
%= l 'mai_DESC_SPAM_SUBJECT'
<p><span class=label>
%= l 'mai_LABEL_SPAM_SUBJECTTAG'
</span><span class=input>
% param 'SpamSubjectTag' => $mai_data->{spamsubjecttag} unless param 'SpamSubjectTag';
%= select_field 'SpamSubjectTag' => [ [ ( l 'DISABLED' ) => 'disabled' ], [ ( l 'ENABLED' ) => 'enabled' ] ], class => 'input';
</span></p>
<p><span class=label>
%= l 'mai_LABEL_SPAM_SUBJECT'
</span><span class=input>
% param 'SpamSubject' => $mai_data->{spamsubject} unless param 'SpamSubject';
%= text_field 'SpamSubject' => class => 'input'
</span></p>
%= l 'mai_DESC_BLOCK_EXECUTABLE_CONTENT'
<p><span class=label>
%= l 'mai_LABEL_CONTENT_TO_BLOCK'
</span><span class=input>
% param 'BlockExecutableContent' => $c->get_patterns_current_opt() unless param 'BlockExecutableContent';
%= select_field 'BlockExecutableContent' => $c->get_patterns_opt(), class => 'input', multiple => "1";
</span></p>
%# ....
%# Probably finally by a submit.
%= submit_button $btn, class => 'action'
% end
</div>

View File

@@ -0,0 +1,152 @@
%#
%# Generated by SM2Gen version:0.9(20Jan2025) Chameleon version:4.5.4 On Python:3.12.3 at 2025-06-29 08:53:20
%#
<div id="Emailsettings-FRONT" class="partial Emailsettings-FRONT">
%# <script>
%# window.onload = function() {
%# SelectInput();
%# };
%# </script>
% if (config->{debug} == 1) {
<pre>
%= dumper $mai_data
<br>
</pre>
% }
% $c->param( Selected => undef ); #This may need deleting for a params panel - only needed for a table
% my $btn = l('Modify');
<fieldset>
<legend><%= $c->l('mai_DESC_STATE_ACCESS_BUTTON') %></legend>
%= form_for 'emailsettings' => ( method => 'POST' ) => begin
<p><span class=label>
%= l 'mai_LABEL_POP_ACCESS_CONTROL'
</span><span class=data2>
%= $c->get_current_pop3_access(TRUE)
</span></p>
<p><span class=label>
%= l 'mai_LABEL_IMAP_ACCESS_CONTROL'
</span><span class=data2>
%= $c->get_current_imap_access(TRUE)
</span></p>
<p><span class=label>
%= l 'mai_LABEL_WEBMAIL'
</span><span class=data2>
%= $c->get_current_webmail_status(TRUE)
</span></p>
<br>
<div class='center'>
%= submit_button "$btn", class => 'action'
</div>
%= hidden_field 'trt' => 'ACC'
% end
</fieldset>
<br>
<fieldset>
<legend><%= $c->l('mai_DESC_STATE_FILTERING_BUTTON') %></legend>
%= form_for 'emailsettings' => ( method => 'POST' ) => begin
<p><span class=label>
%= l 'mai_LABEL_VIRUS_SCAN'
</span><span class=data2>
%= $c->get_virus_status(TRUE)
</span></p>
<p><span class=label>
%= l 'mai_LABEL_SPAM_SCAN'
</span><span class=data2>
%= $c->get_spam_status(TRUE)
</span></p>
<p><span class=label>
%= l 'mai_LABEL_BLOCK_EXECUTABLE_CONTENT'
</span><span class=data2>
%= $c->get_patterns_status(TRUE)
</span></p>
<br>
<div class='center'>
%= submit_button "$btn", class => 'action'
</div>
%= hidden_field 'trt' => 'FIL'
% end
</fieldset>
<br>
<fieldset>
<legend><%= $c->l('mai_DESC_STATE_RECEPTION_BUTTON') %></legend>
%= form_for 'emailsettings' => ( method => 'POST' ) => begin
<p><span class=label>
%= l 'mai_LABEL_MODE'
</span><span class=data2>
%= $mai_data->{fetchmailmethod}
</span></p>
% my $smtp_mesg;
% $smtp_mesg = l('mai_SMTP_port_authenticate');
<p><span class=label>
%= sprintf( $smtp_mesg, $c->get_db_prop( 'qpsmtpd', 'TCPPort', 25 ) );
</span><span class=data2>
%= $c->get_current_smtp_auth(TRUE)
</span></p>
% $smtp_mesg = l('mai_SMTPS_SSL/TLS');
<p><span class=label>
%= sprintf( $smtp_mesg, $c->get_db_prop( 'sqpsmtpd', 'TCPPort', 465 ) );
</span><span class=data2>
%= $c->get_current_smtp_ssl_auth( TRUE, 's', FALSE )
</span></p>
% $smtp_mesg = l 'mai_Submission_port';
<p><span class=label>
%= sprintf( $smtp_mesg, $c->get_db_prop( 'uqpsmtpd', 'TCPPort', 587 ) );
</span><span class=data2>
%= $c->get_current_smtp_ssl_auth( TRUE, 'u', FALSE )
</span></p>
<br />
<div class='center'>
%= submit_button "$btn", class => 'action'
</div>
%= hidden_field 'trt' => 'REC'
% end
</fieldset>
<br>
<fieldset>
<legend><%= $c->l('mai_DESC_STATE_DELIVERY_BUTTON') %></legend>
%= form_for 'emailsettings' => ( method => 'POST' ) => begin
<p><span class=label>
%= l 'mai_LABEL_UNKNOWN'
</span><span class=data2>
%= $c->get_emailunknownuser_status(TRUE)
</span></p>
<p><span class=label>
%= l 'mai_LABEL_DELEGATE'
</span><span class=data2>
%= $c->get_value('DelegateMailServer')
</span></p>
<p><span class=label>
%= l 'mai_LABEL_SMARTHOST'
</span><span class=data2>
%= $c->get_value('SMTPSmartHost')
</span></p>
<br>
<div class='center'>
%= submit_button "$btn", class => 'action'
</div>
%= hidden_field 'trt' => 'DEL'
% end
</fieldset>
</div>

View File

@@ -0,0 +1,159 @@
%#
%# Generated by SM2Gen version:0.9(20Jan2025) Chameleon version:4.5.4 On Python:3.12.3 at 2025-06-29 08:53:20
%#
<div id="Emailsettings-REC" class="partial Emailsettings-REC">
%# <script>
%# window.onload = function() {
%# SelectInput();
%# };
%# </script>
% if (config->{debug} == 1) {
<pre>
%= dumper $mai_data
</pre>
% }
% my $btn = l('SAVE');
% $c->param( Selected => undef ); #This may need deleting for a params panel - only needed for a table
<h2><%= $c->l('mai_DESC_STATE_RECEPTION_BUTTON') %></h2><br>
%= form_for "emailsettingsu" => ( method => 'POST' ) => begin
% param 'trt' => $mai_data->{trt} unless param 'trt';
%= hidden_field 'trt' => $mai_data->{trt}
%# Inputs etc in here.
%= l 'mai_DESC_MODE'
<p><span class=label>
%= l 'mai_LABEL_MODE'
</span><span class=input>
% param 'FetchmailMethod' => $mai_data->{fetchmailmethod} unless param 'FetchmailMethod';
<!--
<pre>
%= dumper $mai_data->{fetchmailmethod}
%= dumper $c->get_retrieval_opt()
%= param 'FetchmailMethod'
</pre>
-->
%= select_field 'FetchmailMethod' => $c->get_retrieval_opt(), class => 'input'
</span></p>
%# =l 'mai_DESC_SMTP_AUTH_CONTROL'
<br />
%= l "mai_SMTP_port_(25)"
<br />
%= l "mai_SMTPS_port_(465)"
<br />
%= l "mai_SMTP_Submission"
<br />
% my $smtp_mesg = l('mai_SMTP_port_authenticate');
<p><span class=label>
%= sprintf( $smtp_mesg, $c->get_db_prop( 'qpsmtpd', 'TCPPort', 25 ) );
</span><span class=input>
% param 'SMTPAuth' => $c->get_current_smtp_auth(FALSE) unless param 'SMTPAuth';
<!--
<pre>
%= dumper $c->get_smtp_auth_opt()
%= dumper $c->get_current_smtp_auth(FALSE)
%= dumper $c->get_db_prop("qpsmtpd","Authentication")
%= param 'SMTPAuth'
</pre>
-->
%= select_field 'SMTPAuth' => $c->get_smtp_auth_opt(), class => 'input'
</span></p>
% my $smtp_mesg = l('SMTPS SSL/TLS auth: port %u status:');
<p><span class=label>
%= sprintf( $smtp_mesg, $c->get_db_prop( 'sqpsmtpd', 'TCPPort', 465 ) );
</span><span class=input>
% param 'sSMTPAuth' => $c->get_current_smtp_ssl_auth( FALSE, 's', TRUE ) unless param 'sSMTPAuth';
%= select_field 'sSMTPAuth' => $c->get_smtp_ssl_auth_opt(), class => 'input'
</span></p>
% my $smtp_mesg = l('Submission port %u status:');
<p><span class=label>
%= sprintf( $smtp_mesg, $c->get_db_prop( 'uqpsmtpd', 'TCPPort', 587 ) );
</span><span class=input>
% param 'uSMTPAuth' => $c->get_current_smtp_ssl_auth( FALSE, 'u', TRUE ) unless param 'uSMTPAuth';
<!--
<pre>
%= dumper $c->get_smtp_ssl_auth_opt()
%= dumper $c->get_current_smtp_ssl_auth(FALSE,'s', TRUE)
%= dumper $c->get_current_smtp_ssl_auth(FALSE,'u', TRUE)
%= dumper $c->get_db_prop("uqpsmtpd","access")
%= param 'uSMTPAuth'
</pre>
-->
%= select_field 'uSMTPAuth' => $c->get_smtp_ssl_auth_opt(), class => 'input'
</span></p>
<!--<hr class="sectionbar" />-->
<h2>
%= l 'mai_TITLE_SECONDARY'
</h2><br>
%= l 'mai_DESC_SECONDARY'
<p><span class=label>
%= l 'mai_LABEL_SECONDARY'
</span><span class=input>
% param 'SecondaryMailServer' => $mai_data->{secondarymailserver} unless param 'SecondaryMailServer';
%= text_field 'SecondaryMailServer', class => 'input'
</span></p>
%= l 'mai_DESC_FETCH_PERIOD'
<p><span class=label>
%= l 'mai_LABEL_FETCH_PERIOD'
</span><span class=input>
% param 'FreqOffice' => $mai_data->{freqoffice} unless param 'FreqOffice';
%= select_field 'FreqOffice' => $c->fetchmail_freq(), class => 'input'
</span></p>
<p><span class=label>
%= l 'mai_LABEL_FETCH_PERIOD_NIGHTS'
</span><span class=input>
% param 'FreqOutside' => $mai_data->{freqoutside} unless param 'FreqOutside';
%= select_field 'FreqOutside' => $c->fetchmail_freq(), class => 'input'
</span></p>
<p><span class=label>
%= l 'mai_LABEL_FETCH_PERIOD_WEEKENDS'
</span><span class=input>
% param 'FreqWeekend' => $mai_data->{freqweekend} unless param 'FreqWeekend';
%= select_field 'FreqWeekend' => $c->fetchmail_freq(), class => 'input'
</span></p>
<p><span class=label>
%= l 'mai_LABEL_POP_ACCOUNT'
</span><span class=input>
% param 'SecondaryMailAccount' => $mai_data->{secondarymailaccount} unless param 'SecondaryMailAccount';
%= text_field 'SecondaryMailAccount', class => 'input'
</span></p>
<p><span class=label>
%= l 'mai_LABEL_POP_PASS'
</span><span class=input>
% param 'SecondaryMailPassword' => $mai_data->{secondarymailpassword} unless param 'SecondaryMailPassword';
%= password_field 'SecondaryMailPassword', class => 'input'
</span></p>
<p><span class=label>
%= l 'mai_LABEL_SORT_METHOD'
</span><span class=input>
% param 'SpecifyHeader' => $mai_data->{specifyheader} unless param 'SpecifyHeader';
%= select_field 'SpecifyHeader' => [ [ ( l 'mai_DEFAULT' ) => 'off' ], [ ( l 'mai_SPECIFY_BELOW' ) => 'on' ] ], class => 'input';
</span></p>
<p><span class=label>
%= l 'mai_LABEL_SORT_HEADER'
</span><span class=input>
% param 'SecondaryMailEnvelope' => $mai_data->{secondarymailenvelope} unless param 'SecondaryMailEnvelope';
%= text_field 'SecondaryMailEnvelope', class => 'input'
</span></p>
%# ....
%# Probably finally by a submit.
%= submit_button $btn, class => 'action'
% end
</div>

View File

@@ -1,42 +1,42 @@
% layout 'default', title => 'Sme server 2 - Support';
% content_for 'head' => begin
%= include 'partials/_head'
%= include 'partials/_head'
% end
% content_for 'header' => begin
%= include 'partials/_header'
%= include 'partials/_header'
% end
% content_for 'info' => begin
%= include 'partials/_info'
%= include 'partials/_info'
% end
% content_for 'navigation' => begin
< %= $navigation % >
%= include 'partials/_navig'
< %= $navigation % >
%= include 'partials/_navig'
% end
% content_for 'footer' => begin
%= include 'partials/_footer'
%= include 'partials/_footer'
% end
% content_for 'end' => begin
<div id="end" class="sme-copyrightbar">
content_end
</div>
<div id="end" class="sme-copyrightbar">
content_end
</div>
% end
<div id="module">
<p> < %= $title % ></p><br>
<%= $modul %><br>
Et eu humo modo paratus quadrum turpis validus. Abico appellatio augue qui refero valetudo vereor. Augue diam eu genitus ille letalis nobis typicus veniam.
<p> < %= $title % ></p><br>
<%= $modul %><br>
Et eu humo modo paratus quadrum turpis validus. Abico appellatio augue qui refero valetudo vereor. Augue diam eu genitus ille letalis nobis typicus veniam.
Dignissim dolus loquor lucidus probo proprius tation torqueo. Abluo luptatum quidem. Acsi aliquip eu ex iaceo natu populus quae scisco si.
Dignissim dolus loquor lucidus probo proprius tation torqueo. Abluo luptatum quidem. Acsi aliquip eu ex iaceo natu populus quae scisco si.
Aliquam autem blandit decet in jus loquor quidne saluto te. Eu meus voco wisi. Abico defui euismod huic jumentum lobortis mos vulpes. Causa eros feugiat hendrerit illum luctus nimis quidem valetudo. Elit ex obruo tation usitas vero. Abigo dolus hendrerit huic iriure jumentum letalis lobortis melior nulla. Blandit causa immitto iriure metuo nutus pagus ut voco.
<br>
<p>
%= link_to Welcome => '/'
</p>
Aliquam autem blandit decet in jus loquor quidne saluto te. Eu meus voco wisi. Abico defui euismod huic jumentum lobortis mos vulpes. Causa eros feugiat hendrerit illum luctus nimis quidem valetudo. Elit ex obruo tation usitas vero. Abigo dolus hendrerit huic iriure jumentum letalis lobortis melior nulla. Blandit causa immitto iriure metuo nutus pagus ut voco.
<br>
<p>
%= link_to Welcome => '/'
</p>
</div>

View File

@@ -1,36 +1,36 @@
% use SrvMngr qw( getNavigation );
% my %nav = %{SrvMngr->getNavigation( $c->languages(), 'N' )};
% use SrvMngr qw( getNavigation );
% my %nav = %{ SrvMngr->getNavigation( $c->languages(), 'N' ) };
<div id='navmenu'>
<!-- <a href='#' id='tognav' class='menu-title'>NAVIGATION</a> -->
<div id='menunav'>
<div id='navmenu'>
<!-- <a href='#' id='tognav' class='menu-title'>NAVIGATION</a> -->
<div id='menunav'>
% my $cc = 200;
% foreach my $h (sort { ($nav{$a}{'WEIGHT'}/$nav{$a}{'COUNT'})
% <=> ($nav{$b}{'WEIGHT'}/$nav{$b}{'COUNT'}) } keys %nav) {
%
<!-- div class='section section-title'><%= $h %></div -->
<div><a href='#' class='section section-title'><%= $h %></a></div>
<div class='togms'>
% my ($classNew, $target, $href) = '';
% foreach (sort { $a->{'WEIGHT'} <=> $b->{'WEIGHT'} } @{$nav{$h}{'DESCRIPTIONS'}}) {
% my $cc = 200;
% foreach my $h (sort { ($nav{$a}{'WEIGHT'}/$nav{$a}{'COUNT'})
% <=> ($nav{$b}{'WEIGHT'}/$nav{$b}{'COUNT'}) } keys %nav) {
%
<!-- div class='section section-title'><%= $h %></div -->
<div><a href='#' class='section section-title'><%= $h %></a></div>
<div class='togms'>
% my ( $classNew, $target, $href ) = '';
% foreach (sort { $a->{'WEIGHT'} <=> $b->{'WEIGHT'} } @{$nav{$h}{'DESCRIPTIONS'}}) {
% next if ($_->{'MENUCAT'} ne 'N' ); # menu Navigation
% next if ( $_->{'MENUCAT'} ne 'N' ); # menu Navigation
% if ( $_->{'FILENAME'} =~ m/^2\// ) {
% $target = '_self';
% (my $file2 = $_->{'FILENAME'}) =~ s|^2/||;
% $href = '/smanager/' . $file2;
% } else {
% $target = 'main';
% $href = '/server-manager' . $_->{'FILENAME'};
% }
<div class='menu-cell'><a class='item<%= $classNew %>' target='<%= $target %>'
id='sme<%= $cc %>' href='<%= $href %>'><%= $_->{'DESCRIPTION'} %></a></div>
% $cc++;
% }
</div>
% if ( $_->{'FILENAME'} =~ m/^2\// ) {
% $target = '_self';
% ( my $file2 = $_->{'FILENAME'} ) =~ s|^2/||;
% $href = '/smanager/' . $file2;
% } else {
% $target = 'main';
% $href = '/server-manager' . $_->{'FILENAME'};
% }
<div class='menu-cell'><a class='item<%= $classNew %>' target='<%= $target %>'
id='sme<%= $cc %>' href='<%= $href %>'><%= $_->{'DESCRIPTION'} %></a></div>
% $cc++;
% }
</div>
% }
</div>
</div>
% }
</div>
</div>

View File

@@ -1,38 +1,38 @@
% use SrvMngr qw( getNavigation );
% my %nav = %{SrvMngr->getNavigation( $c->languages(), 'A' )};
% use SrvMngr qw( getNavigation );
% my %nav = %{ SrvMngr->getNavigation( $c->languages(), 'A' ) };
<div id='navigat2'>
<!-- ><div><a href='#' id='togadm' class='menu-title'>ADMINISTRATION</a></div> -->
<div id='menuadm'>
<div id='navigat2'>
<!-- ><div><a href='#' id='togadm' class='menu-title'>ADMINISTRATION</a></div> -->
<div id='menuadm'>
% my $cc = 100;
% foreach my $h (sort { ($nav{$a}{'WEIGHT'}/$nav{$a}{'COUNT'})
% <=> ($nav{$b}{'WEIGHT'}/$nav{$b}{'COUNT'}) } keys %nav) {
<div><a href='#' class='section section-title'><%= $h %></a></div>
<div class='togms'>
% my ($classNew, $target, $href) = '';
% foreach (sort { $a->{'WEIGHT'} <=> $b->{'WEIGHT'} } @{$nav{$h}{'DESCRIPTIONS'}}) {
% my $cc = 100;
% foreach my $h (sort { ($nav{$a}{'WEIGHT'}/$nav{$a}{'COUNT'})
% <=> ($nav{$b}{'WEIGHT'}/$nav{$b}{'COUNT'}) } keys %nav) {
<div><a href='#' class='section section-title'><%= $h %></a></div>
<div class='togms'>
% my ( $classNew, $target, $href ) = '';
% foreach (sort { $a->{'WEIGHT'} <=> $b->{'WEIGHT'} } @{$nav{$h}{'DESCRIPTIONS'}}) {
% next if ($_->{'MENUCAT'} ne 'A' ); # menu Admin
% next if ( $_->{'MENUCAT'} ne 'A' ); # menu Admin
% if ( $_->{'FILENAME'} =~ m/^2\// ) {
% $target = '_self';
% (my $file2 = $_->{'FILENAME'}) =~ s|^2/||;
% $href = '/smanager/' . $file2;
% } else {
% $target = 'main';
%# $href = '/server-manager' . $_->{'FILENAME'};
%# $href = $c->getlegacyurl($c,'/server-manager' . $_->{'FILENAME'});
% my $host = $c->req->url->to_abs->host;
% $href = "/smanager/legacypanel?url=https://$host/server-manager" . $_->{'FILENAME'};
%
% }
<div class='menu-cell'><a class='item<%= $classNew %>' target='<%= $target %>'
id='sme<%= $cc %>' href='<%= $href %>'><%= $_->{'DESCRIPTION'} %></a></div>
% $cc++;
% }
</div>
% }
% if ( $_->{'FILENAME'} =~ m/^2\// ) {
% $target = '_self';
% ( my $file2 = $_->{'FILENAME'} ) =~ s|^2/||;
% $href = '/smanager/' . $file2;
% } else {
% $target = 'main';
%# $href = '/server-manager' . $_->{'FILENAME'};
%# $href = $c->getlegacyurl($c,'/server-manager' . $_->{'FILENAME'});
% my $host = $c->req->url->to_abs->host;
% $href = "/smanager/legacypanel?url=https://$host/server-manager" . $_->{'FILENAME'};
%
% }
<div class='menu-cell'><a class='item<%= $classNew %>' target='<%= $target %>'
id='sme<%= $cc %>' href='<%= $href %>'><%= $_->{'DESCRIPTION'} %></a></div>
% $cc++;
% }
</div>
% }
</div>
</div>
</div>
</div>

View File

@@ -1,85 +1,85 @@
<div id='pf_add'>
% my $retref= $c->stash("ret");
% my %ret = $retref ? %$retref : (ret => "");
% my @vars = split(/,/, $ret{vars} // '');
% my ($var1, $var2, $var3, $var4, $var5, $var6, $var7) = @vars;
% my $retref = $c->stash("ret");
% my %ret = $retref ? %$retref : ( ret => "" );
% my @vars = split( /,/, $ret{vars} // '' );
% my ( $var1, $var2, $var3, $var4, $var5, $var6, $var7 ) = @vars;
% if ($c->app->config->{debug}) {
<pre>
% if ($c->app->config->{debug}) {
<pre>
%= dumper { ret_data => \%ret }
</pre>
% }
</pre>
% }
% if ($ret{ret} eq "") {
% if ($ret{ret} eq "") {
% } elsif (index($ret{ret},"SUCCESS") != -1) {
<br>
<div class='success'>
%= $c->render_to_string(inline => l($ret{ret}, @vars[0..6]))
</div>
% } else {
<br>
<div class='sme-error'>
%= $c->render_to_string(inline => l($ret{ret}, @vars[0..6]))
</div>
% }
<br />
% my $btn = l('ADD');
% if (config->{debug} == 1) {
</pre>
%= dumper $c->current_route
%= dumper $c->stash("ret")
</pre>
% }
%= form_for '/portforwardingb' => (method => 'POST') => begin
<h2>
%=l "pf_CREATE_RULE"
</h2>
<p>
%=l "pf_SUMMARY_ADD_DESC"
</p><br>
<span class=label>
%=l "pf_LABEL_PROTOCOL"
</span><span class=data>
%=select_field 'proto'=>["TCP","UDP"]
</span><br><br>
<span class=label>
%=l "pf_LABEL_SOURCE_PORT"
</span><span class=data>
%=text_field 'sport'
</span><br><br>
<span class=label>
%=l "pf_LABEL_DESTINATION_PORT"
</span>
<span class=data>
%=text_field 'dport'
</span><br><br>
<span class=label>
%=l "pf_LABEL_DESTINATION_HOST"
</span>
<span class=data>
%=text_field 'dhost'
</span><br><br>
<span class=label>
%=l "pf_ALLOW_HOSTS"
</span>
<span class=data>
%=text_field 'allow'
</span><br><br>
<span class=label>
%=l "pf_RULE_COMMENT"
</span>
<span class=data>
%=text_field 'cmmnt'
</span><br><br>
<p>
<br>
%= submit_button "$btn", class => 'action'
</p>
% } elsif (index($ret{ret},"SUCCESS") != -1) {
<br>
<div class='success'>
%= $c->render_to_string( inline => l( $ret{ret}, @vars[ 0 .. 6 ] ) )
</div>
% } else {
<br>
<div class='sme-error'>
%= $c->render_to_string( inline => l( $ret{ret}, @vars[ 0 .. 6 ] ) )
</div>
% }
<br />
% my $btn = l('ADD');
%end
% if (config->{debug} == 1) {
</pre>
%= dumper $c->current_route
%= dumper $c->stash("ret")
</pre>
% }
</div>
%= form_for '/portforwardingb' => ( method => 'POST' ) => begin
<h2>
%= l "pf_CREATE_RULE"
</h2>
<p>
%= l "pf_SUMMARY_ADD_DESC"
</p><br>
<span class=label>
%= l "pf_LABEL_PROTOCOL"
</span><span class=data>
%= select_field 'proto' => [ "TCP", "UDP" ]
</span><br><br>
<span class=label>
%= l "pf_LABEL_SOURCE_PORT"
</span><span class=data>
%= text_field 'sport'
</span><br><br>
<span class=label>
%= l "pf_LABEL_DESTINATION_PORT"
</span>
<span class=data>
%= text_field 'dport'
</span><br><br>
<span class=label>
%= l "pf_LABEL_DESTINATION_HOST"
</span>
<span class=data>
%= text_field 'dhost'
</span><br><br>
<span class=label>
%= l "pf_ALLOW_HOSTS"
</span>
<span class=data>
%= text_field 'allow'
</span><br><br>
<span class=label>
%= l "pf_RULE_COMMENT"
</span>
<span class=data>
%= text_field 'cmmnt'
</span><br><br>
<p>
<br>
%= submit_button "$btn", class => 'action'
</p>
% end
</div>

View File

@@ -1,66 +1,66 @@
<div id='ln_del'>
% my $btn = l('REMOVE');
% my $proto = $pf_datas->{proto};
% my $sport = $pf_datas->{sport};
% my $dport = $pf_datas->{dport};
% my $dhost = $pf_datas->{dhost};
% my $cmmnt = $pf_datas->{cmmnt};
% my $allow = $pf_datas->{allow};
% if (config->{debug} == 1) {
<pre>
% my $btn = l('REMOVE');
% my $proto = $pf_datas->{proto};
% my $sport = $pf_datas->{sport};
% my $dport = $pf_datas->{dport};
% my $dhost = $pf_datas->{dhost};
% my $cmmnt = $pf_datas->{cmmnt};
% my $allow = $pf_datas->{allow};
% if (config->{debug} == 1) {
<pre>
%= dumper $c->current_route
%= dumper $c->stash("ret")
%= dumper %$pf_datas
</pre>
% }
%= form_for '/portforwardinge' => (method => 'POST') => begin
<br>
%= l "pf_SUMMARY_REMOVE_DESC"
</p><br>
<span class=label>
%=l "pf_LABEL_PROTOCOL"
</span><span class=data>
%=$proto
</span><br><br>
<span class=label>
%=l "pf_LABEL_SOURCE_PORT"
</span><span class=data>
%=$sport
</span><br><br>
<span class=label>
%=l "pf_LABEL_DESTINATION_HOST"
</span>
<span class=data>
%=$dport
</span><br><br>
<span class=label>
%=l "pf_LABEL_DESTINATION_PORT"
</span>
<span class=data>
%=$dhost
</span><br><br>
<span class=label>
%=l "pf_RULE_COMMENT"
</span>
<span class=data>
%=$cmmnt
</span><br><br>
<span class=label>
%=l "pf_ALLOW_HOSTS"
</span>
<span class=data>
%=$allow
</span><br><br>
%#}
%= hidden_field sport=>$sport
%= hidden_field proto=>$proto
<br>
%= submit_button "$btn", class => 'action'
</p>
</pre>
% }
%end
%= form_for '/portforwardinge' => ( method => 'POST' ) => begin
<br>
%= l "pf_SUMMARY_REMOVE_DESC"
</p><br>
<span class=label>
%= l "pf_LABEL_PROTOCOL"
</span><span class=data>
%= $proto
</span><br><br>
<span class=label>
%= l "pf_LABEL_SOURCE_PORT"
</span><span class=data>
%= $sport
</span><br><br>
<span class=label>
%= l "pf_LABEL_DESTINATION_HOST"
</span>
<span class=data>
%= $dport
</span><br><br>
<span class=label>
%= l "pf_LABEL_DESTINATION_PORT"
</span>
<span class=data>
%= $dhost
</span><br><br>
<span class=label>
%= l "pf_RULE_COMMENT"
</span>
<span class=data>
%= $cmmnt
</span><br><br>
<span class=label>
%= l "pf_ALLOW_HOSTS"
</span>
<span class=data>
%= $allow
</span><br><br>
%# }
%= hidden_field sport => $sport
%= hidden_field proto => $proto
<br>
%= submit_button "$btn", class => 'action'
</p>
</div>
% end
</div>

View File

@@ -1,116 +1,116 @@
<div id='pf_list'>
% my $btn = l('pf_CREATE_RULE');
%= form_for '/portforwardinga' => (method => 'POST') => begin
% my $btn = l('pf_CREATE_RULE');
%= form_for '/portforwardinga' => ( method => 'POST' ) => begin
% my $numtcpforwards = @$tcpforwards;
% my $numudpforwards = @$udpforwards;
% my $numudpforwards = @$udpforwards;
% my $retref= $c->stash("ret");
% my %ret = $retref ? %$retref : (ret => "");
% my @vars = split(/,/, $ret{vars} // '');
% my ($var1, $var2, $var3, $var4, $var5, $var6, $var7) = @vars;
% my $retref = $c->stash("ret");
% my %ret = $retref ? %$retref : ( ret => "" );
% my @vars = split( /,/, $ret{vars} // '' );
% my ( $var1, $var2, $var3, $var4, $var5, $var6, $var7 ) = @vars;
% if ($c->app->config->{debug}) {
<pre>
% if ($c->app->config->{debug}) {
<pre>
%= dumper { ret_data => \%ret }
</pre>
% }
</pre>
% }
% if ($ret{ret} eq "") {
%=l "pf_FIRST_PAGE_DESCRIPTION"
% } elsif (index($ret{ret},"SUCCESS") != -1) {
<br>
<div class='success'>
%= $c->render_to_string(inline => l($ret{ret}, @vars[0..6]))
</div>
% } else {
<br>
<div class='sme-error'>
%= $c->render_to_string(inline => l($ret{ret}, @vars[0..6]))
</div>
% }
<br />
% if ($ret{ret} eq "") {
%= l "pf_FIRST_PAGE_DESCRIPTION"
% } elsif (index($ret{ret},"SUCCESS") != -1) {
<br>
<div class='success'>
%= $c->render_to_string( inline => l( $ret{ret}, @vars[ 0 .. 6 ] ) )
</div>
% } else {
<br>
<div class='sme-error'>
%= $c->render_to_string( inline => l( $ret{ret}, @vars[ 0 .. 6 ] ) )
</div>
% }
<br />
<p>
<br>
%= submit_button "$btn", class => 'action'
</p>
<p>
<br>
%= submit_button "$btn", class => 'action'
</p>
% end
% if ($empty){
<br>
%=l 'pf_NO_FORWARDS'
% } else {
<br>
%=l 'pf_SHOW_FORWARDS'
<br><br />
<table class="sme-border TableSort"><thead>
<tr>
<th class='sme-border'>
%=l 'pf_LABEL_PROTOCOL'
</th>
<th class='sme-border'>
%=l 'pf_LABEL_SOURCE_PORT'
</th>
<th class='sme-border'>
%=l 'pf_LABEL_DESTINATION_HOST'
</th>
<th class='sme-border'>
%=l 'pf_LABEL_DESTINATION_PORT'
</th>
<th class='sme-border'>
%=l 'pf_ALLOW_HOSTS'
</th>
<th class='sme-border'>
%=l 'pf_RULE_COMMENT'
</th>
<th class='sme-border'>
%=l 'ACTION'
</th>
</tr>
</thead><tbody>
% my %forwards = ();
% $forwards{TCP} = $tcpforwards;
% $forwards{UDP} = $udpforwards;
% end
% foreach my $proto (sort keys %forwards) {
% if ($empty){
<br>
%= l 'pf_NO_FORWARDS'
% } else {
<br>
%= l 'pf_SHOW_FORWARDS'
<br><br />
<table class="sme-border TableSort"><thead>
<tr>
<th class='sme-border'>
%= l 'pf_LABEL_PROTOCOL'
</th>
<th class='sme-border'>
%= l 'pf_LABEL_SOURCE_PORT'
</th>
<th class='sme-border'>
%= l 'pf_LABEL_DESTINATION_HOST'
</th>
<th class='sme-border'>
%= l 'pf_LABEL_DESTINATION_PORT'
</th>
<th class='sme-border'>
%= l 'pf_ALLOW_HOSTS'
</th>
<th class='sme-border'>
%= l 'pf_RULE_COMMENT'
</th>
<th class='sme-border'>
%= l 'ACTION'
</th>
</tr>
</thead><tbody>
% my %forwards = ();
% $forwards{TCP} = $tcpforwards;
% $forwards{UDP} = $udpforwards;
% if (@{ $forwards{$proto} }) {
% foreach my $entry (@{ $forwards{$proto} }) {
<tr>
% my $sport = $entry->key;
% my $dhost = $entry->prop('DestHost');
% my $dport = $entry->prop('DestPort') || '';
% my $cmmnt = $entry->prop('Comment') || '';
% my $allow = $entry->prop('AllowHosts') || '';
%= t td => (class => 'sme-border') => $proto
%= t td => (class => 'sme-border') => $sport
%= t td => (class => 'sme-border') => $dhost
%= t td => (class => 'sme-border') => $dport
%= t td => (class => 'sme-border') => $allow
%= t td => (class => 'sme-border') => $cmmnt
<td class='sme-border'>
%my $remove_text = l('REMOVE'); # Localized text
%my $csrf_token = "TOKEN"; # CSRF token for security
%my $actionRemove = qq{
% <a href="portforwardingd?CsrfDef=$csrf_token&trt=DEL&sport=$sport&proto=$proto">
% <button type='button' class='sme-remove-button' title='$remove_text' >
% $remove_text
% </button>
% </a>
%};
<%= $c->render_to_string(inline => $actionRemove) %>
</td>
</tr>
% }
% }
%}
%}
</tbody>
</table>
%= hidden_field 'trt' => $pf_datas->{trt}
</div>
% foreach my $proto (sort keys %forwards) {
% if (@{ $forwards{$proto} }) {
% foreach my $entry (@{ $forwards{$proto} }) {
<tr>
% my $sport = $entry->key;
% my $dhost = $entry->prop('DestHost');
% my $dport = $entry->prop('DestPort') || '';
% my $cmmnt = $entry->prop('Comment') || '';
% my $allow = $entry->prop('AllowHosts') || '';
%= t td => ( class => 'sme-border' ) => $proto
%= t td => ( class => 'sme-border' ) => $sport
%= t td => ( class => 'sme-border' ) => $dhost
%= t td => ( class => 'sme-border' ) => $dport
%= t td => ( class => 'sme-border' ) => $allow
%= t td => ( class => 'sme-border' ) => $cmmnt
<td class='sme-border'>
% my $remove_text = l('REMOVE'); # Localized text
% my $csrf_token = "TOKEN"; # CSRF token for security
% my $actionRemove = qq{
% <a href="portforwardingd?CsrfDef=$csrf_token&trt=DEL&sport=$sport&proto=$proto">
% <button type='button' class='sme-remove-button' title='$remove_text' >
% $remove_text
% </button>
% </a>
% };
<%= $c->render_to_string( inline => $actionRemove ) %>
</td>
</tr>
% }
% }
% }
% }
</tbody>
</table>
%= hidden_field 'trt' => $pf_datas->{trt}
</div>

Some files were not shown because too many files have changed in this diff Show More