Updated remote access and flag JS
This commit is contained in:
parent
22fbb582d2
commit
eb05438d80
@ -263,8 +263,12 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
|
|
||||||
function displayLocaleAndFlag() {
|
function displayLocaleAndFlag() {
|
||||||
// Get the browser locale
|
// Get the browser locale
|
||||||
const userLocale = navigator.language || navigator.userLanguage;
|
const userLocale = navigator.languages && navigator.languages.length
|
||||||
|
? navigator.languages[0]
|
||||||
|
: navigator.language;
|
||||||
|
|
||||||
//alert(`User Locale: ${userLocale}`); // Alert the detected locale
|
//alert(`User Locale: ${userLocale}`); // Alert the detected locale
|
||||||
|
//console.log(navigator.languages); // Log language to console
|
||||||
|
|
||||||
const { flag, isUnknown, countryCode } = getFlagEmoji(userLocale);
|
const { flag, isUnknown, countryCode } = getFlagEmoji(userLocale);
|
||||||
|
|
||||||
|
@ -28,7 +28,8 @@
|
|||||||
<form action="/smanager/remoteaccess" method="POST">
|
<form action="/smanager/remoteaccess" method="POST">
|
||||||
|
|
||||||
% my $ipsec = $c->get_ipsecrw_status();
|
% my $ipsec = $c->get_ipsecrw_status();
|
||||||
% if ( $ipsec ) {
|
<!-- reetp not tested -->
|
||||||
|
% if ( $ipsec) {
|
||||||
|
|
||||||
<h2><%= l 'rma_TITLE_IPSECRW' %></h2>
|
<h2><%= l 'rma_TITLE_IPSECRW' %></h2>
|
||||||
<div>
|
<div>
|
||||||
@ -56,7 +57,7 @@
|
|||||||
<br><br>
|
<br><br>
|
||||||
<!--<hr class="" />-->
|
<!--<hr class="" />-->
|
||||||
|
|
||||||
%}
|
% }
|
||||||
|
|
||||||
<!-- percequ include 'partials/_rma_pptp' -->
|
<!-- percequ include 'partials/_rma_pptp' -->
|
||||||
|
|
||||||
@ -109,16 +110,20 @@
|
|||||||
<b><%= l('rma_NO_ENTRIES_YET'); %></b>
|
<b><%= l('rma_NO_ENTRIES_YET'); %></b>
|
||||||
% }
|
% }
|
||||||
|
|
||||||
<%= l 'rma_DESC_VALID_FROM_ENTRIES' %>
|
<br>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<%= l 'rma_DESC_VALID_FROM_ENTRIES' %>
|
||||||
|
</div>
|
||||||
|
|
||||||
<br><br>
|
<br><br>
|
||||||
|
|
||||||
<div class="row g-3 align-items-center">
|
<div class="row g-3 align-items-center">
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
<%= l 'NETWORK' %>
|
<label for="inputNetwork" class="col-form-label"><%= l 'NETWORK' %></label>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-auto">
|
<div class="col-auto">
|
||||||
<%= text_field 'ValidFromNetwork', class => "" %>
|
<input type="text" name="ValidFromNetwork" id="inputNetwork" class="form-control" aria-describedby="Network">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -126,15 +131,17 @@
|
|||||||
|
|
||||||
<div class="row g-3 align-items-center">
|
<div class="row g-3 align-items-center">
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
<%= l 'rma_SUBNET_MASK' %>
|
<label for="inputSubnetMask" class="col-form-label"><%= l 'rma_SUBNET_MASK' %></label>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-auto">
|
<div class="col-auto">
|
||||||
<%= text_field 'ValidFromMask', class => "" %>
|
<input type="text" name="ValidFromMask" id="inputSubnetMask" class="form-control" aria-describedby="Subnet">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!--<hr class="" />-->
|
<!--<hr class="" />-->
|
||||||
|
|
||||||
|
<br><br>
|
||||||
|
|
||||||
<h2><%= l 'rma_TITLE_SSH' %></h2>
|
<h2><%= l 'rma_TITLE_SSH' %></h2>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
@ -183,11 +190,11 @@
|
|||||||
|
|
||||||
<div class="row g-3 align-items-center">
|
<div class="row g-3 align-items-center">
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
<%= l 'rma_LABEL_SSH_PORT' %>
|
<label for="inputSSHPort" class="col-form-label"><%= l 'rma_LABEL_SSH_PORT' %></label>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-auto">
|
<div class="col-sm-1">
|
||||||
% param 'SshTCPPort' => $c->get_ssh_port() unless param 'SshTCPPort';
|
% param 'SshTCPPort' => $c->get_ssh_port() unless param 'SshTCPPort';
|
||||||
<%= text_field 'SshTCPPort' %>
|
<input type="text" name="SshTCPPort" id="inputSSHPort" class="form-control" aria-describedby="SSH Port" value="<%= $c->get_ssh_port() %>">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -195,8 +202,10 @@
|
|||||||
|
|
||||||
<!--<hr class="" />-->
|
<!--<hr class="" />-->
|
||||||
|
|
||||||
|
<br><br>
|
||||||
<h2><%= l 'rma_TITLE_FTP_ACCESS' %></h2>
|
<h2><%= l 'rma_TITLE_FTP_ACCESS' %></h2>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<%= $c->render_to_string(inline => $c->l('rma_DESC_FTP_ACCESS')); %>
|
<%= $c->render_to_string(inline => $c->l('rma_DESC_FTP_ACCESS')); %>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user