1 |
diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/events/actions/locales2-conf smeserver-manager-0.1.0/root/etc/e-smith/events/actions/locales2-conf |
2 |
--- smeserver-manager-0.1.0.old/root/etc/e-smith/events/actions/locales2-conf 2020-08-05 22:11:56.000000000 +0400 |
3 |
+++ smeserver-manager-0.1.0/root/etc/e-smith/events/actions/locales2-conf 2020-08-05 23:57:08.343000000 +0400 |
4 |
@@ -43,9 +43,18 @@ |
5 |
|
6 |
foreach my $lex (@lexs) { |
7 |
my $long_lex = I18NMODULES . "/$module/$lex"; |
8 |
+ |
9 |
next if (-d $long_lex); |
10 |
|
11 |
- my ($mod, $lang) = split /[_.]/, $lex; |
12 |
+ # my ($mod, $lang) = split /[_.]/, $lex; # module name without '_' |
13 |
+ my @elements = split /[_.]/, $lex; |
14 |
+ next if ( scalar @elements < 3 ); |
15 |
+ |
16 |
+ my $mod = join( '_', @elements[0..(scalar @elements - 3)] ); |
17 |
+ my $lang = @elements[scalar @elements - 2]; |
18 |
+ |
19 |
+ next if ( $mod ne lc($module) ); |
20 |
+ |
21 |
my $long_pm = I18NMODULES . "/$module/$lang". '.pm'; |
22 |
if ( -f $long_pm ) { |
23 |
# .pm file newer than .lex |
24 |
diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/templates/usr/share/smanager/themes/default/public/css/styles.css/50body smeserver-manager-0.1.0/root/etc/e-smith/templates/usr/share/smanager/themes/default/public/css/styles.css/50body |
25 |
--- smeserver-manager-0.1.0.old/root/etc/e-smith/templates/usr/share/smanager/themes/default/public/css/styles.css/50body 2020-08-05 22:11:56.000000000 +0400 |
26 |
+++ smeserver-manager-0.1.0/root/etc/e-smith/templates/usr/share/smanager/themes/default/public/css/styles.css/50body 2020-08-05 23:31:25.000000000 +0400 |
27 |
@@ -122,16 +122,29 @@ |
28 |
|
29 |
input.action { |
30 |
margin-left: 0px; |
31 |
- color: darkgreen; |
32 |
background-color: #bee6a2; /*lightgreen;*/ |
33 |
+ color: darkgreen; |
34 |
+ border-radius: 8px; |
35 |
+ border: 2px solid #4CAF50; /* Green */ |
36 |
+ display: flex; |
37 |
+ justify-content: center; |
38 |
+ align-items: center; |
39 |
+} |
40 |
+ |
41 |
+.center { |
42 |
+ display: flex; |
43 |
+ justify-content: center; |
44 |
} |
45 |
|
46 |
input.action2 { |
47 |
margin-left: 0px; |
48 |
color: black; |
49 |
background-color: #d4d0c8; |
50 |
+ display: flex; |
51 |
+ justify-content: center; |
52 |
} |
53 |
|
54 |
+ |
55 |
#modul.desc { |
56 |
padding: 3px; |
57 |
background-color: grey; |
58 |
@@ -162,7 +175,7 @@ |
59 |
font-weight: bold; |
60 |
} |
61 |
|
62 |
-.menu-title { |
63 |
+a.menu-title { |
64 |
display: inline-block; |
65 |
color: #1A6D1A; /*#666;*/ |
66 |
padding-left: 1px; |
67 |
diff -aurN smeserver-manager-0.1.0.old/root/usr/share/smanager/lib/SrvMngr/Controller/Localnetworks.pm smeserver-manager-0.1.0/root/usr/share/smanager/lib/SrvMngr/Controller/Localnetworks.pm |
68 |
--- smeserver-manager-0.1.0.old/root/usr/share/smanager/lib/SrvMngr/Controller/Localnetworks.pm 2020-08-05 22:11:56.000000000 +0400 |
69 |
+++ smeserver-manager-0.1.0/root/usr/share/smanager/lib/SrvMngr/Controller/Localnetworks.pm 2020-08-07 00:35:27.000000000 +0400 |
70 |
@@ -13,8 +13,7 @@ |
71 |
|
72 |
use Locale::gettext; |
73 |
use SrvMngr::I18N; |
74 |
-use SrvMngr qw(theme_list init_session); |
75 |
-use Regexp::Common qw /net/; |
76 |
+use SrvMngr qw(theme_list init_session subnet_mask get_reg_mask ip_number); |
77 |
|
78 |
#use Data::Dumper; |
79 |
use esmith::util; |
80 |
@@ -130,6 +129,7 @@ |
81 |
@localnetworks = $network_db->get_all_by_prop( type => 'network' ); |
82 |
} |
83 |
$c->stash( localnetworks => \@localnetworks ); |
84 |
+ ## $c->redirect_to('/localnetworks'); |
85 |
} |
86 |
|
87 |
$ln_datas{'trt'} = $trt; |
88 |
@@ -200,21 +200,19 @@ |
89 |
my $networkMask = $fm->param('networkMask'); |
90 |
my $networkRouter = $fm->param('networkRouter'); |
91 |
|
92 |
- #Validate syntax of Ips and subnet mask |
93 |
- my $ipregex = $RE{net}{IPv4} ; #Pre-built regex for IpV4 addresses. |
94 |
- my $ipmaskregex=qr/^(((255\.){3}(255|254|252|248|240|224|192|128|0+))|((255\.){2}(255|254|252|248|240|224|192|128|0+)\.0)|((255\.)(255|254|252|248|240|224|192|128|0+)(\.0+){2})|((255|254|252|248|240|224|192|128|0+)(\.0+){3}))$/; |
95 |
+ #Validate Ips and subnet mask |
96 |
|
97 |
- unless ($networkAddress =~$ipregex){ |
98 |
- return (ret=>'ln_INVALID_IP_ADDRESS' , vars=>"Network Address"); |
99 |
- } |
100 |
- |
101 |
- unless ($networkRouter =~$ipregex) { |
102 |
- return (ret=>'ln_INVALID_IP_ADDRESS' , vars=>"Router Address"); |
103 |
- } |
104 |
- |
105 |
- unless ($networkMask =~ $ipmaskregex) { |
106 |
- return (ret=>'ln_INVALID_SUBNET_MASK' ); |
107 |
- } |
108 |
+ my $res = ip_number($fm, $networkAddress); |
109 |
+ return (ret=>'ln_INVALID_IP_ADDRESS', vars=>"Network Address $res") unless $res eq 'OK'; |
110 |
+ |
111 |
+ $res = subnet_mask( $networkMask ); |
112 |
+ return (ret=>'ln_INVALID_SUBNET_MASK', vars=>"$networkMask" ) unless $res eq 'OK'; |
113 |
+ |
114 |
+ $res = ip_number($fm, $networkRouter); |
115 |
+ return (ret=>'ln_INVALID_IP_ADDRESS' , vars=>"Routeur Address $res") unless $res eq 'OK'; |
116 |
+ |
117 |
+ # we transform bit mask to regular mask |
118 |
+ $networkMask = get_reg_mask( $networkAddress, $networkMask ); |
119 |
|
120 |
my $network_db = esmith::NetworksDB->open() |
121 |
|| esmith::NetworksDB->create(); |
122 |
@@ -287,7 +285,7 @@ |
123 |
} |
124 |
else |
125 |
{ my $simpleMask = esmith::util::computeLocalNetworkPrefix( $network, $networkMask ); |
126 |
- return ($fm->render_to_string(inline => l('ln_SUCCESS_NONSTANDARD_RANGE', |
127 |
- vars=>"$network,$networkMask,$networkRouter,$totalHosts,$firstAddr,$lastAddr,$simpleMask"))); |
128 |
+ return ( ret => 'ln_SUCCESS_NONSTANDARD_RANGE', |
129 |
+ vars=>"$network,$networkMask,$networkRouter,$totalHosts,$firstAddr,$lastAddr,$simpleMask"); |
130 |
} |
131 |
} |
132 |
diff -aurN smeserver-manager-0.1.0.old/root/usr/share/smanager/lib/SrvMngr/Controller/Remoteaccess.pm smeserver-manager-0.1.0/root/usr/share/smanager/lib/SrvMngr/Controller/Remoteaccess.pm |
133 |
--- smeserver-manager-0.1.0.old/root/usr/share/smanager/lib/SrvMngr/Controller/Remoteaccess.pm 2020-08-05 22:11:56.000000000 +0400 |
134 |
+++ smeserver-manager-0.1.0/root/usr/share/smanager/lib/SrvMngr/Controller/Remoteaccess.pm 2020-08-06 23:09:49.000000000 +0400 |
135 |
@@ -15,7 +15,7 @@ |
136 |
use Locale::gettext; |
137 |
use SrvMngr::I18N; |
138 |
|
139 |
-use SrvMngr qw(theme_list init_session ip_number); |
140 |
+use SrvMngr qw(theme_list init_session ip_number subnet_mask get_reg_mask); |
141 |
|
142 |
use esmith::ConfigDB; |
143 |
use esmith::util; |
144 |
@@ -106,16 +106,16 @@ |
145 |
|
146 |
# controls |
147 |
$res = pptp_and_dhcp_range( $c, $rma_datas{pptpSessions} ); |
148 |
- $result .= $res unless $res eq 'OK'; |
149 |
+ $result .= $res . ' ' unless $res eq 'OK'; |
150 |
|
151 |
$res = ip_number_or_blank( $c, $rma_datas{validFromNetwork} ); |
152 |
- $result .= $res unless $res eq 'OK'; |
153 |
+ $result .= $res . ' ' unless $res eq 'OK'; |
154 |
|
155 |
$res = subnet_mask_or_blank( $c, $rma_datas{validFromMask} ); |
156 |
- $result .= $res unless $res eq 'OK'; |
157 |
+ $result .= $res . ' ' unless $res eq 'OK'; |
158 |
|
159 |
$res = validate_network_and_mask( $c, $rma_datas{validFromNetwork}, $rma_datas{validFromMask} ); |
160 |
- $result .= $res unless $res eq 'OK'; |
161 |
+ $result .= $res . ' ' unless $res eq 'OK'; |
162 |
|
163 |
#$result .= ' blocked for testing !' . $rma_datas{remove_nets}; |
164 |
} |
165 |
@@ -315,10 +315,13 @@ |
166 |
my $c = shift; |
167 |
my $mask = shift; |
168 |
|
169 |
- if (ip_number_or_blank($c, $mask) eq 'OK') { |
170 |
+ if (!defined($mask) || $mask eq "") { |
171 |
return "OK"; |
172 |
- } |
173 |
- return $c->l('rma_INVALID_SUBNET_MASK') . " (" . $mask . ")"; |
174 |
+ } |
175 |
+ |
176 |
+ chomp $mask ; |
177 |
+ |
178 |
+ return ( subnet_mask( $mask ) ne 'OK' ) ? $c->l('rma_INVALID_SUBNET_MASK') . " (" . $mask . ")" : 'OK'; |
179 |
} |
180 |
|
181 |
|
182 |
@@ -437,6 +440,9 @@ |
183 |
my $net = shift; |
184 |
my $mask = shift; |
185 |
|
186 |
+ # we transform bit mask to regular mask |
187 |
+ $mask = get_reg_mask( $net, $mask ); |
188 |
+ |
189 |
my $rec = $db->get('httpd-admin'); |
190 |
return $c->error('ERR_NO_RECORD') unless $rec; |
191 |
|
192 |
@@ -500,5 +506,3 @@ |
193 |
|
194 |
|
195 |
1; |
196 |
- |
197 |
- |
198 |
diff -aurN smeserver-manager-0.1.0.old/root/usr/share/smanager/lib/SrvMngr/I18N/Modules/Localnetworks/localnetworks_en.lex smeserver-manager-0.1.0/root/usr/share/smanager/lib/SrvMngr/I18N/Modules/Localnetworks/localnetworks_en.lex |
199 |
--- smeserver-manager-0.1.0.old/root/usr/share/smanager/lib/SrvMngr/I18N/Modules/Localnetworks/localnetworks_en.lex 2020-08-05 22:11:56.000000000 +0400 |
200 |
+++ smeserver-manager-0.1.0/root/usr/share/smanager/lib/SrvMngr/I18N/Modules/Localnetworks/localnetworks_en.lex 2020-08-07 00:48:38.000000000 +0400 |
201 |
@@ -29,7 +29,7 @@ |
202 |
{$networkAddress} and subnet mask {$networkMask}) |
203 |
has already been added. Did not add new network.', |
204 |
'ln_ERROR_CREATING_NETWORK' => 'Error occurred while creating network.', |
205 |
-'ln_SUCCESS' =>'Successfully added network {$network}/{$networkMask} via router {$networkRouter}.', |
206 |
+'ln_SUCCESS' =>'Successfully added network [_1]/[_2] via router [_3].', |
207 |
'ln_SUCCESS_SINGLE_ADDRESS' =>'Successfully added network {$network}/{$networkMask} via router {$networkRouter}. Your server will grant local access privileges to the single IP address {$network}. ', |
208 |
'ln_SUCCESS_NETWORK_RANGE' =>'Successfully added network [_1]/[_2] via router [_3]. Your server will grant local access privileges to [_4] IP addresses in the range [_5] to [_6]. ', |
209 |
'ln_NO_SUCH_NETWORK' =>'Network not found in network db', |
210 |
@@ -43,14 +43,7 @@ |
211 |
after this network is removed. ', |
212 |
'ln_REMOVE_HOSTS_LABEL' => 'Remove hosts on network', |
213 |
'ln-extra' => '{$network}/{$networkMask} via router $networkRouter}.', |
214 |
-'ln_SUCCESS_NONSTANDARD_RANGE' =>'<p> |
215 |
- Successfully added network {$network}/{$networkMask} via router |
216 |
- {$networkRouter}. |
217 |
- </p><p> |
218 |
- Your server will grant local |
219 |
- access privileges to {$totalHosts} IP addresses in the range |
220 |
- {$firstAddr} to {$lastAddr}. |
221 |
- </p><p> |
222 |
- Warning: the ProFTPd FTP server cannot |
223 |
- handle this nonstandard subnet mask. The simpler specification |
224 |
- <b>{$simpleMask}</b> will be used instead.</p>', |
225 |
+'ln_SUCCESS_NONSTANDARD_RANGE' =>'<p>Successfully added network [_1]/[_2] via router [_3].</p><p> |
226 |
+ Your server will grant local access privileges to [_4] IP addresses in the range [_5] to [_6].</p><p> |
227 |
+ Warning: the ProFTPd FTP server cannot handle this nonstandard subnet mask. The simpler specification |
228 |
+ <b>[_7]</b> will be used instead.</p>', |
229 |
diff -aurN smeserver-manager-0.1.0.old/root/usr/share/smanager/lib/SrvMngr.pm smeserver-manager-0.1.0/root/usr/share/smanager/lib/SrvMngr.pm |
230 |
--- smeserver-manager-0.1.0.old/root/usr/share/smanager/lib/SrvMngr.pm 2020-08-05 22:11:56.000000000 +0400 |
231 |
+++ smeserver-manager-0.1.0/root/usr/share/smanager/lib/SrvMngr.pm 2020-08-06 23:47:28.000000000 +0400 |
232 |
@@ -10,6 +10,7 @@ |
233 |
use File::Spec; |
234 |
use File::Spec::Functions qw( rel2abs catdir ); |
235 |
use Cwd; |
236 |
+use Net::Netmask; |
237 |
|
238 |
use Mojo::File qw( path ); |
239 |
use Mojo::Home; |
240 |
@@ -30,7 +31,7 @@ |
241 |
init_session get_mod_url theme_list |
242 |
getNavigation ip_number is_normal_password email_simple |
243 |
mac_address_or_blank mac_address ip_number_or_blank |
244 |
- lang_space get_routes_list |
245 |
+ lang_space get_routes_list subnet_mask get_reg_mask |
246 |
); |
247 |
|
248 |
has home => sub { |
249 |
@@ -105,12 +106,12 @@ |
250 |
|
251 |
$self->helper(log_req => sub { |
252 |
my $c = shift; |
253 |
- my $mess = shift; |
254 |
+ my $mess = shift || ''; |
255 |
my $method = $c->req->method; |
256 |
my $url = $c->req->url; |
257 |
my $version = $c->req->version; |
258 |
my $ip = $c->tx->remote_address; |
259 |
- return "Request received => $method $url HTTP/$version from $ip: $mess "; |
260 |
+ return "Request received => $method $url HTTP/$version from $ip : $mess "; |
261 |
}); |
262 |
|
263 |
$self->helper( 'home_page' => sub{ '/initial' } ); |
264 |
@@ -243,17 +244,17 @@ |
265 |
|
266 |
$if_admin->get('/localnetworks')->to('localnetworks#main')->name('localnetworks'); |
267 |
$if_admin->post('/localnetworks')->to('localnetworks#do_display')->name('localnetworks'); |
268 |
- $if_admin->post('/localnetworksadd')->to('localnetworks#do_display')->name('localnetworksadd'); |
269 |
- $if_admin->post('/localnetworksadd1')->to('localnetworks#do_display')->name('localnetworksadd1'); |
270 |
- $if_admin->get('/localnetworksdel')->to('localnetworks#do_display')->name('localnetworksdel'); |
271 |
- $if_admin->post('/localnetworksdel1')->to('localnetworks#do_display')->name('localnetworksdel1'); |
272 |
+ $if_admin->post('/localnetworksa')->to('localnetworks#do_display')->name('localnetworksadd'); |
273 |
+ $if_admin->post('/localnetworksb')->to('localnetworks#do_display')->name('localnetworksadd1'); |
274 |
+ $if_admin->get('/localnetworksd')->to('localnetworks#do_display')->name('localnetworksdel'); |
275 |
+ $if_admin->post('/localnetworkse')->to('localnetworks#do_display')->name('localnetworksdel1'); |
276 |
|
277 |
$if_admin->get('/portforwarding')->to('portforwarding#main')->name('portforwarding'); |
278 |
$if_admin->post('/portforwarding')->to('portforwarding#do_display')->name('portforwarding'); |
279 |
- $if_admin->post('/portforwardingadd')->to('portforwarding#do_display')->name('portforwardingadd'); |
280 |
- $if_admin->post('/portforwardingadd1')->to('portforwarding#do_display')->name('portforwardingadd1'); |
281 |
- $if_admin->get('/portforwardingdel')->to('portforwarding#do_display')->name('portforwardingdel'); |
282 |
- $if_admin->post('/portforwardingdel1')->to('portforwarding#do_display')->name('portforwardingdel1'); |
283 |
+ $if_admin->post('/portforwardinga')->to('portforwarding#do_display')->name('portforwardingadd'); |
284 |
+ $if_admin->post('/portforwardingb')->to('portforwarding#do_display')->name('portforwardingadd1'); |
285 |
+ $if_admin->get('/portforwardingd')->to('portforwarding#do_display')->name('portforwardingdel'); |
286 |
+ $if_admin->post('/portforwardinge')->to('portforwarding#do_display')->name('portforwardingdel1'); |
287 |
|
288 |
$if_admin->get('/printers')->to('printers#main')->name('printersg'); |
289 |
$if_admin->get('/printers2')->to('printers#do_display')->name('printers2g'); |
290 |
@@ -598,6 +599,10 @@ |
291 |
my $lang = shift || ''; |
292 |
|
293 |
my $panel = $c->tx->req->url; |
294 |
+ if ( $panel =~ m/\.css$|\.js$|\.jpg$/ ) { |
295 |
+ warn "panel not treated $panel"; |
296 |
+ } |
297 |
+ |
298 |
$panel = '/initial' if ($panel eq '/' or $panel eq ''); |
299 |
|
300 |
(my $module = $panel) =~ s|\?.*$||; |
301 |
@@ -632,7 +637,7 @@ |
302 |
my @rt; |
303 |
|
304 |
for (@routes) { |
305 |
- my ( $contrib, $name ) = split ( /_/, $_->key); |
306 |
+ my ( $contrib, $name ) = split ( /\+/, $_->key); |
307 |
push @rt, |
308 |
{ 'method' => $_->prop('Method'), 'url' => $_->prop('Url'), |
309 |
'ctlact' => $_->prop('Ctlact'), 'menu' => $_->prop('Menu'), |
310 |
@@ -738,5 +743,31 @@ |
311 |
} |
312 |
|
313 |
|
314 |
+sub subnet_mask { |
315 |
+ |
316 |
+ my ( $data ) = @_; |
317 |
+ |
318 |
+ # we test for a valid mask or bit mask |
319 |
+ my $tip="192.168.1.50"; |
320 |
+ my $block = new Net::Netmask("$tip/$data") or return "INV1 $data"; |
321 |
+ |
322 |
+ if ($block->mask() eq "$data" || $block->bits() eq "$data") { |
323 |
+ return "OK"; |
324 |
+ } |
325 |
+ return "INV2 $data"; |
326 |
+} |
327 |
+ |
328 |
+ |
329 |
+sub get_reg_mask { |
330 |
+ |
331 |
+ my ( $address, $mask ) = @_; |
332 |
+ |
333 |
+ # we transform bit mask to regular mask |
334 |
+ my $block = new Net::Netmask("$address/$mask"); |
335 |
+ |
336 |
+ return $block->mask(); |
337 |
+} |
338 |
+ |
339 |
+ |
340 |
1; |
341 |
|
342 |
diff -aurN smeserver-manager-0.1.0.old/root/usr/share/smanager/themes/default/templates/login.html.ep smeserver-manager-0.1.0/root/usr/share/smanager/themes/default/templates/login.html.ep |
343 |
--- smeserver-manager-0.1.0.old/root/usr/share/smanager/themes/default/templates/login.html.ep 2020-08-05 22:11:56.000000000 +0400 |
344 |
+++ smeserver-manager-0.1.0/root/usr/share/smanager/themes/default/templates/login.html.ep 2020-08-08 16:54:51.776000000 +0400 |
345 |
@@ -39,7 +39,9 @@ |
346 |
%= hidden_field 'From' => $c->tx->req->url |
347 |
|
348 |
<br> |
349 |
+ <div class='center'> |
350 |
%= submit_button "$btn", class => 'action' |
351 |
+ </div> |
352 |
</p> |
353 |
% end |
354 |
|
355 |
diff -aurN smeserver-manager-0.1.0.old/root/usr/share/smanager/themes/default/templates/partials/_ln_add.html.ep smeserver-manager-0.1.0/root/usr/share/smanager/themes/default/templates/partials/_ln_add.html.ep |
356 |
--- smeserver-manager-0.1.0.old/root/usr/share/smanager/themes/default/templates/partials/_ln_add.html.ep 2020-08-05 22:11:56.000000000 +0400 |
357 |
+++ smeserver-manager-0.1.0/root/usr/share/smanager/themes/default/templates/partials/_ln_add.html.ep 2020-08-08 16:57:17.793000000 +0400 |
358 |
@@ -37,7 +37,7 @@ |
359 |
</p> |
360 |
% } |
361 |
|
362 |
- %= form_for '/localnetworksadd1' => (method => 'POST') => begin |
363 |
+ %= form_for '/localnetworksb' => (method => 'POST') => begin |
364 |
<h2> |
365 |
%=l "ln_ADD_TITLE" |
366 |
</h2> |
367 |
@@ -60,7 +60,9 @@ |
368 |
<span class=data> |
369 |
%=text_field 'networkRouter' |
370 |
</span><br><br> |
371 |
+ <div class='center'> |
372 |
%= submit_button "$btn", class => 'action' |
373 |
+ </div> |
374 |
%end |
375 |
|
376 |
</div> |
377 |
diff -aurN smeserver-manager-0.1.0.old/root/usr/share/smanager/themes/default/templates/partials/_ln_del.html.ep smeserver-manager-0.1.0/root/usr/share/smanager/themes/default/templates/partials/_ln_del.html.ep |
378 |
--- smeserver-manager-0.1.0.old/root/usr/share/smanager/themes/default/templates/partials/_ln_del.html.ep 2020-08-05 22:11:56.000000000 +0400 |
379 |
+++ smeserver-manager-0.1.0/root/usr/share/smanager/themes/default/templates/partials/_ln_del.html.ep 2020-08-08 16:57:42.337000000 +0400 |
380 |
@@ -14,7 +14,7 @@ |
381 |
</p> |
382 |
% } |
383 |
|
384 |
- %= form_for '/localnetworksdel1' => (method => 'POST') => begin |
385 |
+ %= form_for '/localnetworkse' => (method => 'POST') => begin |
386 |
<h2> |
387 |
%=l "ln_REMOVE_TITLE" |
388 |
</h2> |
389 |
@@ -49,7 +49,9 @@ |
390 |
</span><br><br> |
391 |
%} |
392 |
%= hidden_field localnetwork=>$localnetwork |
393 |
+ <div class='center'> |
394 |
%= submit_button "$btn", class => 'action' |
395 |
+ </div> |
396 |
%end |
397 |
|
398 |
</div> |
399 |
diff -aurN smeserver-manager-0.1.0.old/root/usr/share/smanager/themes/default/templates/partials/_ln_list.html.ep smeserver-manager-0.1.0/root/usr/share/smanager/themes/default/templates/partials/_ln_list.html.ep |
400 |
--- smeserver-manager-0.1.0.old/root/usr/share/smanager/themes/default/templates/partials/_ln_list.html.ep 2020-08-05 22:11:56.000000000 +0400 |
401 |
+++ smeserver-manager-0.1.0/root/usr/share/smanager/themes/default/templates/partials/_ln_list.html.ep 2020-08-08 16:58:22.161000000 +0400 |
402 |
@@ -1,6 +1,6 @@ |
403 |
<div id='ln_list'> |
404 |
% my $btn = l('ln_LOCALNETWORK_ADD'); |
405 |
- %= form_for '/localnetworksadd' => (method => 'POST') => begin |
406 |
+ %= form_for '/localnetworksa' => (method => 'POST') => begin |
407 |
<p> |
408 |
|
409 |
% my $retref= $c->stash("ret"); |
410 |
@@ -21,6 +21,7 @@ |
411 |
% my $var4 = @vars[3]; |
412 |
% my $var5 = @vars[4]; |
413 |
% my $var6 = @vars[5]; |
414 |
+ % my $var7 = @vars[6]; |
415 |
|
416 |
|
417 |
%if ($ret{ret} eq "") { |
418 |
@@ -28,16 +29,18 @@ |
419 |
%} elsif (index($ret{ret},"SUCCESS") != -1) { |
420 |
<div class='success'> |
421 |
<h2> Operation Status Report</h2> |
422 |
- %= $c->l($ret{ret},$var1,$var2,$var3,$var4,$var5,$var6); |
423 |
+ %= $c->render_to_string(inline => l($ret{ret},$var1,$var2,$var3,$var4,$var5,$var6,$var7)); |
424 |
</div> |
425 |
%} else { |
426 |
<div class='sme-error'> |
427 |
<h2> Operation Status Report - Error</h2> |
428 |
- %= $c->l($ret{ret},$var1,$var2,$var3,$var4,$var5,$var6); |
429 |
+ %= $c->render_to_string(inline => l($ret{ret},$var1,$var2,$var3,$var4,$var5,$var6,$var7)); |
430 |
</div> |
431 |
%} |
432 |
<br><br> |
433 |
+ <div class='center'> |
434 |
%= submit_button "$btn", class => 'action' |
435 |
+ </div> |
436 |
<br> |
437 |
% my $numlocalnetworks = @$localnetworks; |
438 |
% if ($numlocalnetworks == 0){ |
439 |
@@ -79,7 +82,7 @@ |
440 |
%= t td => (class => 'sme-border') => $localnetwork->prop('Router') |
441 |
% if ($removable eq "yes") { |
442 |
<td class='sme-border'> |
443 |
- <a href="/smanager/localnetworksdel?trt=DEL&localnetwork=<%= $localnetwork->key%>"><%=l 'REMOVE'%></a></td> |
444 |
+ <a href="/smanager/localnetworksd?trt=DEL&localnetwork=<%= $localnetwork->key%>"><%=l 'REMOVE'%></a></td> |
445 |
% } else { |
446 |
<td class='sme-border'> </td> |
447 |
%} |
448 |
diff -aurN smeserver-manager-0.1.0.old/root/usr/share/smanager/themes/default/templates/partials/_pf_add.html.ep smeserver-manager-0.1.0/root/usr/share/smanager/themes/default/templates/partials/_pf_add.html.ep |
449 |
--- smeserver-manager-0.1.0.old/root/usr/share/smanager/themes/default/templates/partials/_pf_add.html.ep 2020-08-05 22:11:56.000000000 +0400 |
450 |
+++ smeserver-manager-0.1.0/root/usr/share/smanager/themes/default/templates/partials/_pf_add.html.ep 2020-08-08 16:58:48.785000000 +0400 |
451 |
@@ -36,7 +36,7 @@ |
452 |
</p> |
453 |
% } |
454 |
|
455 |
- %= form_for '/portforwardingadd1' => (method => 'POST') => begin |
456 |
+ %= form_for '/portforwardingb' => (method => 'POST') => begin |
457 |
<h2> |
458 |
%=l "pf_CREATE_RULE" |
459 |
</h2> |
460 |
@@ -77,7 +77,9 @@ |
461 |
<span class=data> |
462 |
%=text_field 'cmmnt' |
463 |
</span><br><br> |
464 |
+ <div class='center'> |
465 |
%= submit_button "$btn", class => 'action' |
466 |
+ </div> |
467 |
%end |
468 |
|
469 |
</div> |
470 |
diff -aurN smeserver-manager-0.1.0.old/root/usr/share/smanager/themes/default/templates/partials/_pf_del.html.ep smeserver-manager-0.1.0/root/usr/share/smanager/themes/default/templates/partials/_pf_del.html.ep |
471 |
--- smeserver-manager-0.1.0.old/root/usr/share/smanager/themes/default/templates/partials/_pf_del.html.ep 2020-08-05 22:11:56.000000000 +0400 |
472 |
+++ smeserver-manager-0.1.0/root/usr/share/smanager/themes/default/templates/partials/_pf_del.html.ep 2020-08-08 16:59:22.721000000 +0400 |
473 |
@@ -16,7 +16,7 @@ |
474 |
</p> |
475 |
% } |
476 |
|
477 |
- %= form_for '/portforwardingdel1' => (method => 'POST') => begin |
478 |
+ %= form_for '/portforwardinge' => (method => 'POST') => begin |
479 |
<br> |
480 |
%= l "pf_SUMMARY_REMOVE_DESC" |
481 |
</p><br> |
482 |
@@ -57,7 +57,9 @@ |
483 |
%#} |
484 |
%= hidden_field sport=>$sport |
485 |
%= hidden_field proto=>$proto |
486 |
+ <div class='center'> |
487 |
%= submit_button "$btn", class => 'action' |
488 |
+ </div> |
489 |
%end |
490 |
|
491 |
</div> |
492 |
diff -aurN smeserver-manager-0.1.0.old/root/usr/share/smanager/themes/default/templates/partials/_pf_list.html.ep smeserver-manager-0.1.0/root/usr/share/smanager/themes/default/templates/partials/_pf_list.html.ep |
493 |
--- smeserver-manager-0.1.0.old/root/usr/share/smanager/themes/default/templates/partials/_pf_list.html.ep 2020-08-05 22:11:56.000000000 +0400 |
494 |
+++ smeserver-manager-0.1.0/root/usr/share/smanager/themes/default/templates/partials/_pf_list.html.ep 2020-08-08 16:59:44.417000000 +0400 |
495 |
@@ -1,6 +1,6 @@ |
496 |
<div id='pf_list'> |
497 |
% my $btn = l('pf_CREATE_RULE'); |
498 |
- %= form_for '/portforwardingadd' => (method => 'POST') => begin |
499 |
+ %= form_for '/portforwardinga' => (method => 'POST') => begin |
500 |
|
501 |
% my $retref= $c->stash("ret"); |
502 |
% my %ret; |
503 |
@@ -34,7 +34,9 @@ |
504 |
</div> |
505 |
%} |
506 |
<br><br> |
507 |
+ <div class='center'> |
508 |
%= submit_button "$btn", class => 'action' |
509 |
+ </div> |
510 |
<br> |
511 |
|
512 |
% if ($empty){ |
513 |
@@ -96,7 +98,7 @@ |
514 |
%= t td => (class => 'sme-border') => $allow |
515 |
%= t td => (class => 'sme-border') => $cmmnt |
516 |
<td class='sme-border'> |
517 |
- <a href="/smanager/portforwardingdel?trt=DEL&sport=<%= $sport%>&proto=<%= $proto%>"><%=l 'REMOVE'%></a></td> |
518 |
+ <a href="/smanager/portforwardingd?trt=DEL&sport=<%= $sport%>&proto=<%= $proto%>"><%=l 'REMOVE'%></a></td> |
519 |
</tr> |
520 |
% } |
521 |
% } |
522 |
diff -aurN smeserver-manager-0.1.0.old/root/usr/share/smanager/themes/default/templates/remoteaccess.html.ep smeserver-manager-0.1.0/root/usr/share/smanager/themes/default/templates/remoteaccess.html.ep |
523 |
--- smeserver-manager-0.1.0.old/root/usr/share/smanager/themes/default/templates/remoteaccess.html.ep 2020-08-05 22:11:56.000000000 +0400 |
524 |
+++ smeserver-manager-0.1.0/root/usr/share/smanager/themes/default/templates/remoteaccess.html.ep 2020-08-08 16:56:06.920000000 +0400 |
525 |
@@ -225,7 +225,10 @@ |
526 |
</p> |
527 |
%} |
528 |
|
529 |
+ |
530 |
+ <div class='center'> |
531 |
%= submit_button "$btn", class => 'action' |
532 |
+ </div> |
533 |
|
534 |
% end |
535 |
|