diff --git a/root/etc/e-smith/db/configuration/defaults/smanager/status b/root/etc/e-smith/db/configuration/defaults/smanager/status new file mode 100644 index 0000000..86981e6 --- /dev/null +++ b/root/etc/e-smith/db/configuration/defaults/smanager/status @@ -0,0 +1 @@ +enabled diff --git a/root/etc/e-smith/db/configuration/defaults/smanager/type b/root/etc/e-smith/db/configuration/defaults/smanager/type new file mode 100644 index 0000000..0a5db1a --- /dev/null +++ b/root/etc/e-smith/db/configuration/defaults/smanager/type @@ -0,0 +1,2 @@ +service + diff --git a/root/etc/e-smith/db/configuration/migrate/smanager b/root/etc/e-smith/db/configuration/migrate/smanager new file mode 100644 index 0000000..1a3ec5b --- /dev/null +++ b/root/etc/e-smith/db/configuration/migrate/smanager @@ -0,0 +1,38 @@ +{ + sub gen_pwd { + use MIME::Base64 qw(encode_base64); + my $p = "not set due to error"; + if ( open( RANDOM, "/dev/urandom" ) ){ + my $buf; + # 57 bytes is a full line of Base64 coding, and contains + # 456 bits of randomness - given a perfectly random /dev/random + if ( read( RANDOM, $buf, 57 ) != 57 ){ + warn("Short read from /dev/random: $!"); + } + else{ + $p = encode_base64($buf); + chomp $p; + } + close RANDOM; + } + else{ + warn "Could not open /dev/urandom: $!"; + } + return $p; + } + + my $rec = $DB->get('smanager') + || $DB->new_record('smanager', {type => 'service'}); + + my $pwd = $rec->prop('Secrets'); + if (not $pwd or length($pwd) < 57){ + my $pwd = gen_pwd(); + $rec->set_prop('Secrets', $pwd); + } + + my $theme = $rec->prop('Theme'); + if (not $theme){ + $rec->set_prop('Theme', 'default'); + } + +} diff --git a/root/etc/e-smith/events/actions/locales2-conf b/root/etc/e-smith/events/actions/locales2-conf new file mode 100644 index 0000000..045caae --- /dev/null +++ b/root/etc/e-smith/events/actions/locales2-conf @@ -0,0 +1,109 @@ +#!/usr/bin/perl -w + +#---------------------------------------------------------------------- +# copyright (C) 1999-2006 Mitel Networks Corporation +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +#---------------------------------------------------------------------- +package esmith; +use strict; + +use constant DEBUG => 0; + +use constant I18NMODULES => '/usr/share/smanager/lib/SrvMngr/I18N/Modules'; + + #------------------------- + # get locale modules list + #------------------------- +opendir DIR, I18NMODULES or die "Couldn't open ", I18NMODULES, "\n"; +my @dirs = grep (/^[A-Z]/, readdir (DIR)); +closedir DIR; + +# put 'General' lexicon first +unshift @dirs, 'General'; + +foreach my $module (@dirs) { + + next if (-f I18NMODULES . "/$module"); + + #------------------------- + # get lexicons list + #------------------------- + opendir DIR, I18NMODULES . "/$module" or die "Couldn't open ", I18NMODULES, "\n"; + my @lexs = grep (/_.*\.lex$/, readdir (DIR)); + closedir DIR; + + foreach my $lex (@lexs) { + my $long_lex = I18NMODULES . "/$module/$lex"; + + next if (-d $long_lex); + + # my ($mod, $lang) = split /[_.]/, $lex; # module name without '_' + my @elements = split /[_.]/, $lex; + next if ( scalar @elements < 3 ); + + my $mod = join( '_', @elements[0..(scalar @elements - 3)] ); + my $lang = @elements[scalar @elements - 2]; + + next if ( $mod ne lc($module) ); + + $lang =~ s/-/_/; + my $long_pm = I18NMODULES . "/$module/$lang". '.pm'; + if ( -f $long_pm ) { + # .pm file not newer than .lex + next if ((stat($long_lex))[9] < (stat($long_pm))[9]); + print "locales2: error cp\n" unless system("cp -f $long_pm ${long_pm}.svg") == 0; + } + + open(FIL, '>:encoding(UTF-8)', $long_pm) + or die "Couldn't open ", $long_pm, " for writing.\n"; + + print FIL "package SrvMngr::I18N::Modules::${module}::${lang};\n"; + print FIL "use strict;\nuse warnings;\nuse utf8;\nuse Mojo::Base 'SrvMngr::I18N';\n\n"; + print FIL "use SrvMngr::I18N::Modules::General::${lang};\n\nmy %lexicon = (\n"; + + #-------------------- + # copy lexicon to pm + #-------------------- + open(FIL2, '<:encoding(UTF-8)', $long_lex) + or die "Couldn't open ", $long_lex, " for reading.\n"; + while ( ) { + print FIL $_; + } + close FIL2; + + print FIL ");\n\nour %Lexicon = (\n"; + print FIL " %\{ SrvMngr::I18N::Modules::General::${lang}::Lexicon \},\n" unless $module eq 'General'; + print FIL " %lexicon\n);\n\n\n1;\n"; + + close FIL; + + #------------------------- + # eval and restore if NOT OK + #------------------------- + if ( eval "use lib '".I18NMODULES."/../../../'; require '$long_pm';" ) { + print "Lexicon $lang for $module ($lex) written to ${lang}.pm\n" if DEBUG; + if ( -f ${long_pm}.'.svg' ) { + print "locales2: error rm" unless system("rm -f ${long_pm}.svg") == 0; + } + } else { + print "ERROR: Lexicon $lang for $module ($lex) NOT written to ${lang}.pm\n$@\n"; + if ( -f ${long_pm}.'.svg' ) { + print "locales2: error mv" unless system("mv -f ${long_pm}.svg $long_pm") == 0; + } + } + } +} diff --git a/root/etc/e-smith/events/actions/navigation2-conf b/root/etc/e-smith/events/actions/navigation2-conf new file mode 100644 index 0000000..ae7960f --- /dev/null +++ b/root/etc/e-smith/events/actions/navigation2-conf @@ -0,0 +1,176 @@ +#!/usr/bin/perl -w + +#---------------------------------------------------------------------- +# copyright (C) 1999-2006 Mitel Networks Corporation +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +#---------------------------------------------------------------------- +package esmith; +use strict; + +use constant SMNGR_LIB => '/usr/share/smanager/lib'; +use constant I18NMODULES => 'SrvMngr/I18N/Modules'; +use constant WEBFUNCTIONS => 'SrvMngr/Controller'; +use constant NAVDIR => '/home/e-smith/db'; +use constant NAVIGATIONDIR => 'navigation2'; +use constant DEBUG => 0; + +use esmith::NavigationDB; +use esmith::I18N; + +use Data::Dumper; # activate if DEBUG + +my $navigation_ignore = + "(\.\.?|Swttheme\.pm|Login\.pm|Request\.pm|Modules\.pm(-.*)?)"; + +my $i18n = new esmith::I18N; + +my %navdbs; + +opendir FUNCTIONS, SMNGR_LIB.'/'.WEBFUNCTIONS or + die "Couldn't open ", SMNGR_LIB.'/'.WEBFUNCTIONS, "\n"; +my @files = grep (!/^${navigation_ignore}$/, readdir (FUNCTIONS)); +closedir FUNCTIONS; + +my @langs = $i18n->availableLanguages(); +#my @langs = ('en', 'fr'); +#print Dumper(\@langs); + + +foreach my $lang (@langs) +{ + my $long_lex = SMNGR_LIB.'/'.I18NMODULES."/General/general_$lang.lex"; + next unless ( -e $long_lex ); + + open(LEX, '<:encoding(UTF-8)', $long_lex) + or die "Couldn't open ", $long_lex, " for reading.\n"; + my @gen_lex = ; + close LEX; + + foreach my $file (@files) + { + next if (-d SMNGR_LIB.'/'.WEBFUNCTIONS . "/$file"); +# next unless ( $file =~ m/D.*\.pm$/ ); + next unless ( $file =~ m/[A-Z].*\.pm$/ ); + + my $file2 = lc($file); + $file2 =~ s/\.pm$//; + + #-------------------------------------------------- + # extract heading, description and weight information + # from Mojo controller + #-------------------------------------------------- + open(SCRIPT, SMNGR_LIB.'/'.WEBFUNCTIONS . "/$file"); + my $heading = undef; + my $description = undef; + my $heading_weight = undef; + my $description_weight = undef; + my $menucat = undef; + my $routes = undef; + + while ( diff --git a/root/usr/share/smanager/themes/default/templates/csrf_400.html.ep b/root/usr/share/smanager/themes/default/templates/csrf_400.html.ep new file mode 100644 index 0000000..85850a8 --- /dev/null +++ b/root/usr/share/smanager/themes/default/templates/csrf_400.html.ep @@ -0,0 +1,10 @@ +% layout 'default', title => "Sme server 2 - err 400"; + +% content_for 'module' => begin +
+
+ %= l 'CSRF_VALIDATION_FAILURE' +
+ +
+% end diff --git a/root/usr/share/smanager/themes/default/templates/datetime.html.ep b/root/usr/share/smanager/themes/default/templates/datetime.html.ep new file mode 100644 index 0000000..ebe1553 --- /dev/null +++ b/root/usr/share/smanager/themes/default/templates/datetime.html.ep @@ -0,0 +1,124 @@ +% layout 'default', title => "Sme server 2 - datetime"; + +% content_for 'module' => begin +
+ + % if ($config->{debug} == 1) { +

+ %= dumper $c->current_route + %= dumper $dat_datas +

+ % } + + % if ( stash 'error' ) { +
+ %= $c->render_to_string(inline => stash 'error') +
+ %} + +

<%= $title %>


+ %= $modul + <% my $btn = l('SAVE'); %> + + %= form_for '/datetime' => (method => 'POST') => begin +

+ %= hidden_field 'Old_ntpstatus' => $dat_datas->{ntpstatus}; + + % param 'Ntpstatus' => $dat_datas->{ntpstatus} unless param 'Ntpstatus'; + %= radio_button Ntpstatus => 'enabled' + + %=l 'dat_NTP_CONFIGURE_TITLE' + +
+ % if ($dat_datas->{ntpstatus} eq 'disabled') { +

+ %=l 'dat_NTP_ENABLE_DESC' +
+
+ % } else { +
+ %=l 'dat_NTP_CONFIGURE_DESC' +

+

+ %=l 'dat_CURRENT_SETTING' + + %= $dat_datas->{now_string} + +

+
+ + %=l 'dat_NTP_SERVER' + + %= text_field 'Ntpserver' => $dat_datas->{ntpserver}, class => 'input' + +

+
+ % } + %= radio_button Ntpstatus => 'disabled' + + %=l 'dat_NTP_DISABLE_TITLE' + + + % if ($dat_datas->{ntpstatus} eq 'enabled') { + +

+
+ %=l 'dat_NTP_DISABLE_DESC' +
+ % } else { +
+
+

+

+ %=l 'dat_CURRENT_SETTING' + + %= $dat_datas->{now_string} + +
+ + %=l 'dat_NEW_M/D/Y' + + % param 'Month' => $dat_datas->{month} unless param 'Month'; + %= select_field 'Month' => $c->getMonth_list(), class => 'input' + + % param 'Day' => $dat_datas->{day} unless param 'Day'; + %= text_field 'Day', size => '2', class => 'input' + + % param 'Year' => $dat_datas->{year} unless param 'Year'; + %= text_field 'Year', size => '4', class => 'input' + +
+ + %=l 'dat_NEW_H/M/S' + + % param 'Hour' => $dat_datas->{hour} unless param 'Hour'; + %= text_field 'Hour', size => '2', class => 'input' + + % param 'Minute' => $dat_datas->{minute} unless param 'Minute'; + %= text_field 'Minute', size => '2', class => 'input' + + % param 'Second' => $dat_datas->{second} unless param 'Second'; + %= text_field 'Second', size => '2', class => 'input' + +
+ + %=l 'dat_AM/PM_AND_TZ' + + % param 'Ampm' => $dat_datas->{ampm} unless param 'Ampm'; + %= select_field 'Ampm' => ['AM', 'PM'], class => 'input' + + % param 'Timezone' => $c->getTimezone() unless param 'Timezone'; + %= select_field 'Timezone' => $c->getZone_list(), class => 'input' + +

+
+ % } +

+
+ %= submit_button "$btn", class => 'action' +

+ + % end + +
+%end diff --git a/root/usr/share/smanager/themes/default/templates/default.html.ep b/root/usr/share/smanager/themes/default/templates/default.html.ep new file mode 100644 index 0000000..578e01b --- /dev/null +++ b/root/usr/share/smanager/themes/default/templates/default.html.ep @@ -0,0 +1,13 @@ +% layout 'default', title => 'Sme server 2 - Support'; + +% content_for 'module' => begin + +
+

<%= $title %>

+ <%= $modul %> +

+ %= link_to Initial => '/' +

+
+ +%end \ No newline at end of file diff --git a/root/usr/share/smanager/themes/default/templates/directory.html.ep b/root/usr/share/smanager/themes/default/templates/directory.html.ep new file mode 100644 index 0000000..d2e03fe --- /dev/null +++ b/root/usr/share/smanager/themes/default/templates/directory.html.ep @@ -0,0 +1,88 @@ +% layout 'default', title => "Sme server 2 - directory"; + +% content_for 'module' => begin +
+ + %if ($config->{debug} == 1) { +

+ (DBG)route: <%= $c->current_route %>
+ (DBG)dir. access: <%= $dir_datas->{access}%>
+

+ %} + +

<%= $title %>

+
+ <%= $modul %> + <% my $btn = l('SAVE'); + %> + + + %= form_for 'directory' => (method => 'POST') => begin +
+

+ + %= l('dir_LABEL_ROOT'), class => 'label' + + %= $dir_datas->{root}, class => 'data' + +

+

+ %=l 'dir_DESC_DIRECTORY_ACCESS', class => 'desc' +
+ + %=l 'dir_DIRECTORY_ACCESS', class => 'label' + + % 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' + +

+

+ %=l 'dir_DESC_DEPARTMENT', class => 'desc' +

+ + %=l 'dir_DEPARTMENT', class => 'label' + + %= text_field 'department' => $dir_datas->{department}, class => 'input' + +

+ + %=l 'dir_COMPANY', class => 'label' + + %= text_field 'company', $dir_datas->{company}, class => 'input' + +

+ + %=l 'dir_STREET', class => 'label' + + %= text_field 'street' => $dir_datas->{street}, class => 'input' + +

+ + %=l 'dir_CITY', class => 'label' + + %= text_field 'city', $dir_datas->{city}, class => 'input' + +

+ + %=l 'dir_PHONENUMBER', class => 'label' + + %= text_field 'phonenumber', $dir_datas->{phonenumber}, class => 'input' + +

+

+ %=l 'dir_DESC_EXISTING', class => 'desc' +

+ + %=l 'dir_EXISTING', class => 'label' + + %= select_field 'existing'=> [[ (l 'dir_LEAVE') => 'leave'], [ (l 'dir_UPDATE') => 'update' ]], class => 'input' + +

+

+
+ %= submit_button "$btn", class => 'action' +

+ % end + +
+%end diff --git a/root/usr/share/smanager/themes/default/templates/domains.html.ep b/root/usr/share/smanager/themes/default/templates/domains.html.ep new file mode 100644 index 0000000..259d86c --- /dev/null +++ b/root/usr/share/smanager/themes/default/templates/domains.html.ep @@ -0,0 +1,32 @@ +% layout 'default', title => "Sme server 2 - domains"; + +% content_for 'module' => begin +
+ + % if ($config->{debug} == 1) { +

+ %= dumper $c->current_route + %= dumper $dom_datas +

+ % } + + % if ( stash 'error' ) { +
+ %= $c->render_to_string(inline => stash 'error') +
+ %} + +

<%= $title%>

+ + % 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' + %} + +
+%end diff --git a/root/usr/share/smanager/themes/default/templates/emailaccess.html.ep b/root/usr/share/smanager/themes/default/templates/emailaccess.html.ep new file mode 100644 index 0000000..38eb372 --- /dev/null +++ b/root/usr/share/smanager/themes/default/templates/emailaccess.html.ep @@ -0,0 +1,57 @@ +% layout 'default', title => "Sme server 2 - emailaccess"; + +% content_for 'module' => begin +
+ + % if ($config->{debug} == 1) { +

+ %= dumper $c->current_route + %= dumper $mai_datas +

+ % } + + % if ( stash 'error' ) { +
+ %= $c->render_to_string(inline => stash 'error') +
+ %} + +

<%= $title%>

+ + %= form_for '/emailsettingd' => (method => 'POST') => begin + + %=l 'mai_DESC_POP_ACCESS_CONTROL' + +

+ %=l 'mai_LABEL_POP_ACCESS_CONTROL' + + % param 'POPAccess' => $c->get_current_pop3_access() unless param 'POPAccess'; + %= select_field 'POPAccess' => $c->get_pop_opt(), class => 'input' +

+ + %=l 'mai_DESC_IMAP_ACCESS_CONTROL' + +

+ %=l 'mai_LABEL_IMAP_ACCESS_CONTROL' + + % param 'IMAPAccess' => $c->get_current_imap_access() unless param 'IMAPAccess'; + %= select_field 'IMAPAccess' => $c->get_imap_opt(), class => 'input' +

+ + %=l 'mai_DESC_WEBMAIL' + +

+ %=l 'mai_LABEL_WEBMAIL' + + % param 'WebMail' => $c->get_current_webmail_status() unless param 'WebMail'; + %= select_field 'WebMail' => $c->get_webmail_opt(), class => 'input' +

+ + % my $btn = l('SAVE'); + %= submit_button "$btn", class => 'action' + + %= hidden_field 'trt' => 'ACC' + % end + +
+%end diff --git a/root/usr/share/smanager/themes/default/templates/emaildeliver.html.ep b/root/usr/share/smanager/themes/default/templates/emaildeliver.html.ep new file mode 100644 index 0000000..b758120 --- /dev/null +++ b/root/usr/share/smanager/themes/default/templates/emaildeliver.html.ep @@ -0,0 +1,92 @@ +% layout 'default', title => "Sme server 2 - emaildeliver"; + +% content_for 'module' => begin +
+ + % if ($config->{debug} == 1) { +

+ %= dumper $c->current_route + %= dumper $mai_datas +

+ % } + + % if ( stash 'error' ) { +
+ %= $c->render_to_string(inline => stash 'error') +
+ %} + +

<%= $title%>

+ + %= form_for '/emailsettingd' => (method => 'POST') => begin + +

+ %=l 'mai_TITLE_UNKNOWN' +

+ + %=l 'mai_DESC_UNKNOWN' + +

+ %=l 'mai_LABEL_UNKNOWN' + + % param 'EmailUnknownUser' => $mai_datas->{emailunknownuser} unless param 'EmailUnknownUser'; + %= select_field 'EmailUnknownUser' => $c->get_emailunknownuser_opt(), class => 'input' +

+ + +

+ %=l 'mai_TITLE_DELEGATE' +

+ + %=l 'mai_DESC_DELEGATE' + +

+ %=l 'mai_LABEL_DELEGATE' + + % param 'DelegateMailServer' => $mai_datas->{delegatemailserver} unless param 'DelegateMailServer'; + %= text_field 'DelegateMailServer', class => 'input' +

+ +
+

+ %=l 'mai_TITLE_SMARTHOST' +

+ + %=l 'mai_DESC_SMARTHOST' + +

+ %=l 'mai_LABEL_SMARTHOST' + + % param 'SMTPSmartHost' => $mai_datas->{smtpsmarthost} unless param 'SMTPSmartHost'; + %= text_field 'SMTPSmartHost', class => 'input' +

+ +

+ %=l 'mai_LABEL_SMARTHOST_SMTPAUTH_STATUS' + + % param 'SMTPAUTHPROXY_status' => $mai_datas->{smtpauthproxystatus} unless param 'SMTPAUTHPROXY_status'; + %= select_field 'SMTPAUTHPROXY_status' => [[(l 'DISABLED') => 'disabled'], [(l 'ENABLED') => 'enabled']], class => 'input' +

+ +

+ %=l 'mai_LABEL_SMARTHOST_SMTPAUTH_USERID' + + % param 'SMTPAUTHPROXY_Userid' => $mai_datas->{smtpauthproxyuserid} unless param 'SMTPAUTHPROXY_Userid'; + %= text_field 'SMTPAUTHPROXY_Userid', class => 'input' +

+ +

+ %=l 'mai_LABEL_SMARTHOST_SMTPAUTH_PASSWD' + + % param 'SMTPAUTHPROXY_Passwd' => $mai_datas->{smtpauthproxypassword} unless param 'SMTPAUTHPROXY_Passwd'; + %= password_field 'SMTPAUTHPROXY_Passwd', class => 'input' +

+ + % my $btn = l('SAVE'); + %= submit_button "$btn", class => 'action' + + %= hidden_field 'trt' => 'DEL' + % end + +
+%end diff --git a/root/usr/share/smanager/themes/default/templates/emailfilter.html.ep b/root/usr/share/smanager/themes/default/templates/emailfilter.html.ep new file mode 100644 index 0000000..586880b --- /dev/null +++ b/root/usr/share/smanager/themes/default/templates/emailfilter.html.ep @@ -0,0 +1,101 @@ +% layout 'default', title => "Sme server 2 - emailfilter"; + +% content_for 'module' => begin +
+ + % if ($config->{debug} == 1) { +

+ %= dumper $c->current_route + %= dumper $mai_datas +

+ % } + + % if ( stash 'error' ) { +
+ %= $c->render_to_string(inline => stash 'error') +
+ %} + +

<%= $title%>

+ + %= form_for '/emailsettingd' => (method => 'POST') => begin + + %=l 'mai_DESC_VIRUS_SCAN' + +

+ %=l 'mai_LABEL_VIRUS_SCAN' + + % param 'VirusStatus' => $mai_datas->{virusstatus} unless param 'VirusStatus'; + %= select_field 'VirusStatus' => [[(l 'DISABLED') => 'disabled'], [ (l 'ENABLED') => 'enabled']], class => 'input' +

+ + %=l 'mai_DESC_SPAM_SCAN' + +

+ %=l 'mai_LABEL_SPAM_SCAN' + + % param 'SpamStatus' => $mai_datas->{spamstatus} unless param 'SpamStatus'; + %= select_field 'SpamStatus' => [[(l 'DISABLED') => 'disabled'], [ (l 'ENABLED') => 'enabled']], class => 'input' +

+ +

+ %=l 'mai_LABEL_SPAM_SENSITIVITY' + + % param 'SpamSensitivity' => $mai_datas->{spamsensitivity} unless param 'SpamSensitivity'; + %= select_field 'SpamSensitivity' => $c->get_spam_sensitivity_opt(), class => 'input' +

+ +

+ %=l 'mai_LABEL_SPAM_TAGLEVEL' + + % param 'SpamTagLevel' => $mai_datas->{spamtaglevel} unless param 'SpamTagLevel'; + %= select_field 'SpamTagLevel' => $c->get_spam_level_options(), class => 'input' +

+ +

+ %=l 'mai_LABEL_SPAM_REJECTLEVEL' + + % param 'SpamRejectLevel' => $mai_datas->{spamrejectlevel} unless param 'SpamRejectLevel'; + %= select_field 'SpamRejectLevel' => $c->get_spam_level_options(), class => 'input' +

+ +

+ %=l 'mai_LABEL_SORTSPAM' + + % param 'SpamSortSpam' => $mai_datas->{spamsortspam} unless param 'SpamSortSpam'; + %= select_field 'SpamSortSpam' => [[(l 'DISABLED') => 'disabled'], [ (l 'ENABLED') => 'enabled']], class => 'input' +

+ + %=l 'mai_DESC_SPAM_SUBJECT' + +

+ %=l 'mai_LABEL_SPAM_SUBJECTTAG' + + % param 'SpamSubjectTag' => $mai_datas->{spamsubjecttag} unless param 'SpamSubjectTag'; + %= select_field 'SpamSubjectTag' => [[(l 'DISABLED') => 'disabled'], [ (l 'ENABLED') => 'enabled']], class => 'input' +

+ +

+ %=l 'mai_LABEL_SPAM_SUBJECT' + + % param 'SpamSubject' => $mai_datas->{spamsubject} unless param 'SpamSubject'; + %= text_field 'SpamSubject' => class => 'input' +

+ + %=l 'mai_DESC_BLOCK_EXECUTABLE_CONTENT' + +

+ %=l 'mai_LABEL_CONTENT_TO_BLOCK' + + % param 'BlockExecutableContent' => $c->get_patterns_current_opt() unless param 'BlockExecutableContent'; + %= select_field 'BlockExecutableContent' => $c->get_patterns_opt(), class => 'input', multiple => "1" +

+ + % my $btn = l('SAVE'); + %= submit_button "$btn", class => 'action' + + %= hidden_field 'trt' => 'FIL' + % end + +
+%end diff --git a/root/usr/share/smanager/themes/default/templates/emailreceive.html.ep b/root/usr/share/smanager/themes/default/templates/emailreceive.html.ep new file mode 100644 index 0000000..e5cc1ee --- /dev/null +++ b/root/usr/share/smanager/themes/default/templates/emailreceive.html.ep @@ -0,0 +1,113 @@ +% layout 'default', title => "Sme server 2 - emailreceive"; + +% content_for 'module' => begin +
+ + % if ($config->{debug} == 1) { +

+ %= dumper $c->current_route + %= dumper $mai_datas +

+ % } + + % if ( stash 'error' ) { +
+ %= $c->render_to_string(inline => stash 'error') +
+ %} + +

<%= $title%>

+ + %= form_for '/emailsettingd' => (method => 'POST') => begin + + %=l 'mai_DESC_MODE' + +

+ %=l 'mai_LABEL_MODE' + + % param 'FetchmailMethod' => $mai_datas->{fetchmailmethod} unless param 'FetchmailMethod'; + %= select_field 'FetchmailMethod' => $c->get_retrieval_opt(), class => 'input' +

+ + %=l 'mai_DESC_SMTP_AUTH_CONTROL' + +

+ %=l 'mai_LABEL_SMTP_AUTH_CONTROL' + + % param 'SMTPAuth' => $c->get_current_smtp_auth() unless param 'SMTPAuth'; + %= select_field 'SMTPAuth' => $c->get_smtp_auth_opt(), class => 'input' +

+ +
+

+ %=l 'mai_TITLE_SECONDARY' +

+ + %=l 'mai_DESC_SECONDARY' + +

+ %=l 'mai_LABEL_SECONDARY' + + % param 'SecondaryMailServer' => $mai_datas->{secondarymailserver} unless param 'SecondaryMailServer'; + %= text_field 'SecondaryMailServer', class => 'input' +

+ + %=l 'mai_DESC_FETCH_PERIOD' + +

+ %=l 'mai_LABEL_FETCH_PERIOD' + + % param 'FreqOffice' => $mai_datas->{freqoffice} unless param 'FreqOffice'; + %= select_field 'FreqOffice' => $c->fetchmail_freq(), class => 'input' +

+ +

+ %=l 'mai_LABEL_FETCH_PERIOD_NIGHTS' + + % param 'FreqOutside' => $mai_datas->{freqoutside} unless param 'FreqOutside'; + %= select_field 'FreqOutside' => $c->fetchmail_freq(), class => 'input' +

+ +

+ %=l 'mai_LABEL_FETCH_PERIOD_WEEKENDS' + + % param 'FreqWeekend' => $mai_datas->{freqweekend} unless param 'FreqWeekend'; + %= select_field 'FreqWeekend' => $c->fetchmail_freq(), class => 'input' +

+ +

+ %=l 'mai_LABEL_POP_ACCOUNT' + + % param 'SecondaryMailAccount' => $mai_datas->{secondarymailaccount} unless param 'SecondaryMailAccount'; + %= text_field 'SecondaryMailAccount', class => 'input' +

+ +

+ %=l 'mai_LABEL_POP_PASS' + + % param 'SecondaryMailPassword' => $mai_datas->{secondarymailpassword} unless param 'SecondaryMailPassword'; + %= password_field 'SecondaryMailPassword', class => 'input' +

+ +

+ %=l 'mai_LABEL_SORT_METHOD' + + % param 'SpecifyHeader' => $mai_datas->{specifyheader} unless param 'SpecifyHeader'; + %= select_field 'SpecifyHeader' => [[(l 'mai_DEFAULT') => 'off'], [(l 'mai_SPECIFY_BELOW') => 'on']], class => 'input' +

+ +

+ %=l 'mai_LABEL_SORT_HEADER' + + % param 'SecondaryMailEnvelope' => $mai_datas->{secondarymailenvelope} unless param 'SecondaryMailEnvelope'; + %= text_field 'SecondaryMailEnvelope', class => 'input' +

+ + % my $btn = l('SAVE'); + %= submit_button "$btn", class => 'action' + + %= hidden_field 'trt' => 'REC' + % end + +
+%end diff --git a/root/usr/share/smanager/themes/default/templates/emailsettings.html.ep b/root/usr/share/smanager/themes/default/templates/emailsettings.html.ep new file mode 100644 index 0000000..d3f7047 --- /dev/null +++ b/root/usr/share/smanager/themes/default/templates/emailsettings.html.ep @@ -0,0 +1,130 @@ +% layout 'default', title => "Sme server 2 - emailsettings"; + +% content_for 'module' => begin +
+ + % if ($config->{debug} == 1) { +

+ %= dumper $c->current_route + %= dumper $mai_datas +

+ % } + + % if ( stash 'error' ) { +
+ %= $c->render_to_string(inline => stash 'error') +
+ %} + +

<%= $title%>

+ + %= form_for 'emailsettings' => (method => 'POST') => begin +

+ %=l 'mai_LABEL_POP_ACCESS_CONTROL' + + %= $c->get_current_pop3_access( 1 ) +

+ +

+ %=l 'mai_LABEL_IMAP_ACCESS_CONTROL' + + %= $c->get_current_imap_access( 1 ) +

+ +

+ %=l 'mai_LABEL_WEBMAIL' + + %= $c->get_current_webmail_status( 1 ) +

+ + % my $btn = l('mai_DESC_STATE_ACCESS_BUTTON'); +
+ %= submit_button "$btn", class => 'action' +
+ + %= hidden_field 'trt' => 'ACC' + % end + +
+ + %= form_for 'emailsettings' => (method => 'POST') => begin +

+ %=l 'mai_LABEL_VIRUS_SCAN' + + %= $c->get_virus_status(1) +

+ +

+ %=l 'mai_LABEL_SPAM_SCAN' + + %= $c->get_spam_status(1) +

+ +

+ %=l 'mai_LABEL_BLOCK_EXECUTABLE_CONTENT' + + %= $c->get_patterns_status(1) +

+ + % my $btn = l('mai_DESC_STATE_FILTERING_BUTTON'); +
+ %= submit_button "$btn", class => 'action' +
+ + %= hidden_field 'trt' => 'FIL' + % end + +
+ + %= form_for 'emailsettings' => (method => 'POST') => begin +

+ %=l 'mai_LABEL_MODE' + + %= $mai_datas->{fetchmailmethod} +

+ +

+ %=l 'mai_LABEL_SMTP_AUTH_CONTROL' + + %= $c->get_current_smtp_auth( 1 ) +

+ + % my $btn = l('mai_DESC_STATE_RECEPTION_BUTTON'); +
+ %= submit_button "$btn", class => 'action' +
+ + %= hidden_field 'trt' => 'REC' + % end + +
+ + %= form_for 'emailsettings' => (method => 'POST') => begin +

+ %=l 'mai_LABEL_UNKNOWN' + + %= $c->get_emailunknownuser_status( 1 ) +

+ +

+ %=l 'mai_LABEL_DELEGATE' + + %= $c->get_value('DelegateMailServer') +

+ +

+ %=l 'mai_LABEL_SMARTHOST' + + %= $c->get_value('SMTPSmartHost') +

+ + % my $btn = l('mai_DESC_STATE_DELIVERY_BUTTON'); +
+ %= submit_button "$btn", class => 'action' +
+ + %= hidden_field 'trt' => 'DEL' + % end + +
+%end diff --git a/root/usr/share/smanager/themes/default/templates/embedded.html.ep b/root/usr/share/smanager/themes/default/templates/embedded.html.ep new file mode 100644 index 0000000..62785c3 --- /dev/null +++ b/root/usr/share/smanager/themes/default/templates/embedded.html.ep @@ -0,0 +1,23 @@ +% layout 'default', title => "Sme server 2 - embedded"; + +% content_for 'module' => begin + +
+ % if ($config->{debug} == 1) { +

+ %= dumper $c->current_route +

+ % } + % if ( stash 'error' ) { +
+ %= $c->render_to_string(inline => stash 'error') +
+ %} +

Embedded - <%=$title %>


+

If the legacy panel does not appear, then you may not be logged into the original Server manager.
You can log in by clicking here. Or by clicking on the "Legacy SM" button at the top of the window.

+ % my $height = $c->stash('height') | '600px'; + % if ($height !~ /px$/) { $height = $height.'px';} + <%= $c->stash('title') %> not found +
+ +%end diff --git a/root/usr/share/smanager/themes/default/templates/exception_development.html.ep b/root/usr/share/smanager/themes/default/templates/exception_development.html.ep new file mode 100644 index 0000000..01a616b --- /dev/null +++ b/root/usr/share/smanager/themes/default/templates/exception_development.html.ep @@ -0,0 +1,17 @@ +% layout 'default', title => 'Sme server 2 - Error D'; + +% content_for 'module' => begin + +
+


dev
Oups !!! + The page you were requesting + "<%= $self->req->url->path || '/' %>" + caused en exception !! +
dev
+

+

+ %= link_to Back => '/' +

+
+ +% end diff --git a/root/usr/share/smanager/themes/default/templates/groups.html.ep b/root/usr/share/smanager/themes/default/templates/groups.html.ep new file mode 100644 index 0000000..da7df24 --- /dev/null +++ b/root/usr/share/smanager/themes/default/templates/groups.html.ep @@ -0,0 +1,33 @@ +% layout 'default', title => "Sme server 2 - groups"; + +% content_for 'module' => begin +
+ + % if ($config->{debug} == 1) { +

+ %= dumper $c->current_route + %= dumper $grp_datas +

+ % } + + % if ( stash 'error' ) { +
+ %= $c->render_to_string(inline => stash 'error') +
+ %} + +

<%= $title%>

+ + % 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' + %} + +
+%end + diff --git a/root/usr/share/smanager/themes/default/templates/hostentries.html.ep b/root/usr/share/smanager/themes/default/templates/hostentries.html.ep new file mode 100644 index 0000000..256e847 --- /dev/null +++ b/root/usr/share/smanager/themes/default/templates/hostentries.html.ep @@ -0,0 +1,35 @@ +% layout 'default', title => "Sme server 2 - hostentries"; + +% content_for 'module' => begin +
+ + % if ($config->{debug} == 1) { +

+ %= dumper $c->current_route + %= dumper $hos_datas +

+ % } + +

<%= $title%>

+ + % if ( $notif ) { +
+ + <%= $c->render_to_string(inline => $notif) %> + + %} + + % 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' + %} + +
+%end diff --git a/root/usr/share/smanager/themes/default/templates/ibays.html.ep b/root/usr/share/smanager/themes/default/templates/ibays.html.ep new file mode 100644 index 0000000..ed547ae --- /dev/null +++ b/root/usr/share/smanager/themes/default/templates/ibays.html.ep @@ -0,0 +1,39 @@ +% layout 'default', title => "Sme server 2 - ibays"; + +% content_for 'module' => begin +
+ + % if ($config->{debug} == 1) { +

+ %= dumper $c->current_route + %= dumper $iba_datas +

+ % } + + % if ( stash 'error' ) { +
+ %= $c->render_to_string(inline => stash 'error') +
+ %} + +

<%= $title%>

+ + % 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' + %} + +
+%end + diff --git a/root/usr/share/smanager/themes/default/templates/initial.html.ep b/root/usr/share/smanager/themes/default/templates/initial.html.ep new file mode 100644 index 0000000..5031d37 --- /dev/null +++ b/root/usr/share/smanager/themes/default/templates/initial.html.ep @@ -0,0 +1,28 @@ +% layout 'default', title => 'Sme server 2 - Initial'; + +% content_for 'module' => begin + + % if ($config->{debug} == 1) { +

+ %= dumper $c->current_route +

+ % } + +
+ + % if ( stash 'error' ) { +
+ %= $c->render_to_string(inline => stash 'error') +
+ %} + +

+ %= $title +

+
+

+ %= $modul +

+
+ +% end diff --git a/root/usr/share/smanager/themes/default/templates/layouts/default.html.ep b/root/usr/share/smanager/themes/default/templates/layouts/default.html.ep new file mode 100644 index 0000000..4a978cd --- /dev/null +++ b/root/usr/share/smanager/themes/default/templates/layouts/default.html.ep @@ -0,0 +1,136 @@ + + + + +<%= $title %> + + + %= stylesheet '/css/sme_core.css' + %= stylesheet '/css/sme_main.css' + %= stylesheet '/css/sme_menu.css' + %= stylesheet '/css/styles.css' + %= content_for 'head_contrib' + % if (config 'hasJquery') { + %= include 'partials/_js_imports' + %= include 'common_js' + % } + %= 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' + + %= stylesheet '/js/dataTables.buttons.min.js' + %= stylesheet '/js/jszip.min.js' + %= stylesheet '/js/pdfmake.min.js' + %= stylesheet '/js/vfs_fonts.js' + %= stylesheet '/js/buttons.html5.min.js' + %= stylesheet '/js/buttons.print.min.js' + + %= stylesheet '/css/sme-jquery-overrides.css' + + + + +% if ( not defined $c->session->{lang} ) { +% SrvMngr::init_session ( $c ); +% } + + +
+ + % if (config 'hasJquery') { + %= content 'js_toggleMenu' + % } + + +
+ + %= include 'partials/_info' + + % if (flash 'success') { +
+ %= $c->render_to_string(inline => flash 'success') +
+ % } + % if ( flash 'warning' ) { +
+ %= $c->render_to_string(inline => flash 'warning') +
+ %} + % if ( flash 'error' ) { +
+ %= $c->render_to_string(inline => flash 'error') +
+ %} + %= content 'module' + %= include 'partials/_footer' +
+
+ + % if (config 'hasJquery') { + %= content 'js_swapClass' + %= content 'js_togglePassword' + % } + +%= javascript '/js/sme-dataTable-setup.js' + +%= javascript begin +//Set menu to initial condition based on localStorage +$(document).ready(function() { + let menunavflag = window.localStorage.getItem('menunav'); + if (menunavflag != "false"){ + $('#menunav').toggle(true); + } else { + $('#menunav').toggle(false); + } + + let menuadmflag = window.localStorage.getItem('menuadm'); + if (menuadmflag != "false"){ + $('#menuadm').toggle(true); + } else { + $('#menuadm').toggle(false); + } + + let menuuserflag = window.localStorage.getItem('menuuser'); + if (menuuserflag != "false"){ + $('#menuuser').toggle(true); + } else { + $('#menuuser').toggle(false); + } + + var sections = document.getElementsByClassName("section-title"); + for (var i = 0, len = sections.length; i < len; i++) { + var jqObj = $(sections[i]); + var $section = jqObj.parent().next('div'); + if(!$section.length){ + return false; + } + let localStorageTag = "admSection-"+sections[i].innerHTML; + if (window.localStorage.getItem(localStorageTag) != "false"){ + $section.toggle(true); + } else { + $section.toggle(false); + } + } +}) +%end + + + diff --git a/root/usr/share/smanager/themes/default/templates/localnetworks.html.ep b/root/usr/share/smanager/themes/default/templates/localnetworks.html.ep new file mode 100644 index 0000000..82241b5 --- /dev/null +++ b/root/usr/share/smanager/themes/default/templates/localnetworks.html.ep @@ -0,0 +1,32 @@ +% layout 'default', title => "Sme server 2 - localnetworks"; + +% content_for 'module' => begin +
+ + % if ($config->{debug} == 1) { +

+ %= dumper $c->current_route + %= dumper $c->stash("ret") + %= dumper $c->param("localnetwork"); + %= dumper $c->stash("ln_datas"); + %= dumper $c->param("deletehost"); +

+ % } + +

<%= $title%>

+ %= $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' + %} + +
+%end diff --git a/root/usr/share/smanager/themes/default/templates/login.html.ep b/root/usr/share/smanager/themes/default/templates/login.html.ep new file mode 100644 index 0000000..89cd346 --- /dev/null +++ b/root/usr/share/smanager/themes/default/templates/login.html.ep @@ -0,0 +1,69 @@ +% layout 'default', title => "Sme server 2 - login"; + +% content_for 'module' => begin + + +%end diff --git a/root/usr/share/smanager/themes/default/templates/manual.html.ep b/root/usr/share/smanager/themes/default/templates/manual.html.ep new file mode 100644 index 0000000..934fba8 --- /dev/null +++ b/root/usr/share/smanager/themes/default/templates/manual.html.ep @@ -0,0 +1,9 @@ +% layout 'default', title => 'Sme server 2 - Manual'; + +% content_for 'module' => begin +
+

<%= $title %>

+ %= $c->render_to_string( inline => stash 'modul' ) +
+ +% end diff --git a/root/usr/share/smanager/themes/default/templates/module.html.ep b/root/usr/share/smanager/themes/default/templates/module.html.ep new file mode 100644 index 0000000..e09e787 --- /dev/null +++ b/root/usr/share/smanager/themes/default/templates/module.html.ep @@ -0,0 +1,20 @@ +% layout 'default', title => "Sme server 2 - module"; + +% content_for 'module' => begin + +
+ % if ($config->{debug} == 1) { +

+ %= dumper $c->current_route +

+ % } + % if ( stash 'error' ) { +
+ %= $c->render_to_string(inline => stash 'error') +
+ %} +

<%=$title %>


+ %= $c->render_to_string( inline => stash 'modul' ) +
+ +%end \ No newline at end of file diff --git a/root/usr/share/smanager/themes/default/templates/not_found.development.html.ep b/root/usr/share/smanager/themes/default/templates/not_found.development.html.ep new file mode 100644 index 0000000..1a3b648 --- /dev/null +++ b/root/usr/share/smanager/themes/default/templates/not_found.development.html.ep @@ -0,0 +1,15 @@ +% layout 'defaultlight', title => 'Sme server 2 - Error D'; + +% content_for 'module' => begin + +
+


dev
Oups !!! + The page you were requesting + "<%= $self->req->url->path || '/' %>" + could not be found. +
dev
+ %= link_to Initial => '/Initial' +

+
+ +% end diff --git a/root/usr/share/smanager/themes/default/templates/not_found.html.ep b/root/usr/share/smanager/themes/default/templates/not_found.html.ep new file mode 100644 index 0000000..1a283f6 --- /dev/null +++ b/root/usr/share/smanager/themes/default/templates/not_found.html.ep @@ -0,0 +1,10 @@ +% layout 'defaultlight', title => 'Sme server 2 - Error P'; +
+



+ The page you were requesting + "<%= $self->req->url->path || '/' %>" + could not be found. +

+ %= link_to Welcome => '/' +

+
diff --git a/root/usr/share/smanager/themes/default/templates/partials/_dom_del.html.ep b/root/usr/share/smanager/themes/default/templates/partials/_dom_del.html.ep new file mode 100644 index 0000000..cd4d9f2 --- /dev/null +++ b/root/usr/share/smanager/themes/default/templates/partials/_dom_del.html.ep @@ -0,0 +1,29 @@ +
+ + % my $btn = l('REMOVE'); + %= form_for '/domains2' => (method => 'POST') => begin +

+

+ %=l 'dom_REMOVE_TITLE' +

+

+ +

+ %= $c->l('dom_REMOVE_DESCRIPTION', $dom_datas->{domain}, $dom_datas->{description}); +

+ +

+ %= l('dom_ABOUT_TO_REMOVE') +

+ +

+
+ %= submit_button "$btn", class => 'action' +

+ + %= hidden_field 'trt' => $dom_datas->{trt} + %= hidden_field 'Domain' => $dom_datas->{domain} + + % end + +
diff --git a/root/usr/share/smanager/themes/default/templates/partials/_dom_list.html.ep b/root/usr/share/smanager/themes/default/templates/partials/_dom_list.html.ep new file mode 100644 index 0000000..40f39b4 --- /dev/null +++ b/root/usr/share/smanager/themes/default/templates/partials/_dom_list.html.ep @@ -0,0 +1,105 @@ +
+ + % my $btn = l('dom_ADD_DOMAIN'); + + + %= form_for '/domains' => (method => 'POST') => begin + + %= l('dom_FORM_DESCRIPTION'); + +

+
+ %= submit_button "$btn", class => 'action' +

+ + %= hidden_field 'trt' => 'ADD' + + % end + +

+ %=l 'dom_CURRENT_DOMAINS' +

+ + + + + + + + + + + % foreach my $domain ( @$domains ) { + + %= 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 = "" . "" . ""; + + % my $removable = ($domain->{Removable} || 'yes'); + % my $actionRemove = ' '; + + % if ($removable eq 'yes') { + % $actionRemove = "" . "" . ""; + % } + + + + % } + + +
+ %=l 'DOMAIN_NAME' + + %=l 'DESCRIPTION_BRIEF' + + %=l 'dom_CONTENT' + + %=l 'dom_LABEL_NAMESERVERS' + + %=l 'ACTION' +
+ <%= $c->render_to_string(inline => $actionModify) %> <%= $c->render_to_string(inline => $actionRemove) %> +
+ + %= hidden_field 'trt' => 'ADD' + + %= form_for '/domains' => (method => 'POST') => begin + +
+ + % my $btn2 = l('dom_DOMAINS_PAGE_CORPORATE_DNS'); + +

+ %= l 'dom_DESC_CORPORATE_DNS_CURRENT' +

+ +

+ + %=l 'dom_LABEL_CORPORATE_DNS_PRIMARY' + + %= $dom_datas->{forwarder} + +

+ + % if ($dom_datas->{forwarder2}) { +

+ + %=l 'dom_LABEL_CORPORATE_DNS_SECONDARY' + + %= $dom_datas->{forwarder2} + +

+ % } + +

+ %= submit_button "$btn2", class => 'action' +

+ %= hidden_field 'trt' => 'UP2' + % end + + + +
diff --git a/root/usr/share/smanager/themes/default/templates/partials/_dom_up2.html.ep b/root/usr/share/smanager/themes/default/templates/partials/_dom_up2.html.ep new file mode 100644 index 0000000..52e74c2 --- /dev/null +++ b/root/usr/share/smanager/themes/default/templates/partials/_dom_up2.html.ep @@ -0,0 +1,37 @@ +
+ + % my $btn = l('SAVE'); + + %= form_for '/domains2' => (method => 'POST') => begin + +


+ %=l 'dom_DESC_CORPORATE_DNS' +

+ +

+ + %=l 'dom_LABEL_CORPORATE_DNS_PRIMARY' + + % param 'Forwarder' => $dom_datas->{forwarder} unless param 'Forwarder'; + %= text_field 'Forwarder', class => 'input' + +

+ +

+ + %=l 'dom_LABEL_CORPORATE_DNS_SECONDARY', class => 'label' + + % param 'Forwarder2' => $dom_datas->{forwarder2} unless param 'Forwarder2'; + %= text_field 'Forwarder2', class => 'input' + +

+ +

+ %= submit_button "$btn", class => 'action' +

+ + %= hidden_field 'trt' => $dom_datas->{trt} + + %end + +
diff --git a/root/usr/share/smanager/themes/default/templates/partials/_dom_upd.html.ep b/root/usr/share/smanager/themes/default/templates/partials/_dom_upd.html.ep new file mode 100644 index 0000000..74be847 --- /dev/null +++ b/root/usr/share/smanager/themes/default/templates/partials/_dom_upd.html.ep @@ -0,0 +1,70 @@ +
+ + % my $btn = l('ADD'); + + %= form_for '/domains2' => (method => 'POST') => begin +

+

+ % if ( $dom_datas->{trt} eq "ADD" ) { + %=l 'dom_CREATE_TITLE' + % } else { + %=l 'dom_MODIFY_TITLE' + % $btn = l('MODIFY'); + % } +

+

+ +


+ + %=l 'DOMAIN_NAME', class => 'label' + + % 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' + % } + +

+ +


+ + %=l 'DESCRIPTION_BRIEF', class => 'label' + + % param 'Description' => $dom_datas->{description} unless param 'Description'; + %= text_field 'Description', class => 'input' + +

+ +


+ %=l 'dom_CONTENT_FIELD_DESCRIPTION' +
+ + %= $c->l('dom_CONTENT', ''); + + % param 'Content' => $dom_datas->{content} unless param 'Content'; + %= select_field 'Content', $c->content_options_list(), class => 'input' + +

+ +


+ %=l 'dom_DESC_NAMESERVERS' +
+ + %=l 'dom_LABEL_NAMESERVERS', class => 'label' + + % param 'Nameservers' => $dom_datas->{nameservers} unless param 'Nameservers'; + %= select_field 'Nameservers', $c->nameserver_options_list(), class => 'input' + +

+ +


+ %= submit_button "$btn", class => 'action' +

+ + %= hidden_field 'trt' => $dom_datas->{trt} + + %end + +
diff --git a/root/usr/share/smanager/themes/default/templates/partials/_footer.html.ep b/root/usr/share/smanager/themes/default/templates/partials/_footer.html.ep new file mode 100644 index 0000000..58fc90b --- /dev/null +++ b/root/usr/share/smanager/themes/default/templates/partials/_footer.html.ep @@ -0,0 +1,11 @@ +