Multi-language support

This commit is contained in:
bergware
2020-03-04 17:33:46 +01:00
parent 5712ec6282
commit c8148442d2
163 changed files with 3886 additions and 2838 deletions
+19 -13
View File
@@ -5,8 +5,8 @@ Icon="icon-home"
Tag="home"
---
<?PHP
/* Copyright 2005-2018, Lime Technology
* Copyright 2012-2018, Bergware International.
/* Copyright 2005-2020, Lime Technology
* Copyright 2012-2020, Bergware International.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License version 2,
@@ -23,37 +23,43 @@ $name_warn = preg_match('/'.$name_regex.'/', $var['NAME']) ? 'none' : 'block';
?>
<form markdown="1" name="NameSettings" method="POST" action="/update.htm" target="progressFrame">
Server name:
: <input type="text" name="NAME" id="NAME" maxlength="15" pattern="<?=$name_regex;?>" value="<?=htmlspecialchars($var['NAME'])?>" title="Only alphanumeric characters (&quot;A-Z&quot;, &quot;a-z&quot;, and &quot;0-9&quot;), dashes (&quot;-&quot;), and dots (&quot;.&quot;); and, the first and last characters must be alphanumeric" <?=$disabled?> required> <span id="name_warning" style="display:<?=$name_warn?>"><i class="fa fa-warning icon warning"></i> Not compatible with NetBIOS</span>
_(Server name)_:
: <input type="text" name="NAME" id="NAME" maxlength="15" pattern="<?=$name_regex?>" value="<?=htmlspecialchars($var['NAME'])?>" title="_(Only alphanumeric characters)_ (&quot;A-Z&quot;, &quot;a-z&quot;, and &quot;0-9&quot;), dashes (&quot;-&quot;), and dots (&quot;.&quot;); _(and, the first and last characters must be alphanumeric)_" <?=$disabled?> required> <span id="name_warning" style="display:<?=$name_warn?>"><i class="fa fa-warning icon warning"></i> _(Not compatible with NetBIOS)_</span>
:help55
> The network identity of your server. Also known as *hostname* or *short hostname*. Windows networking
> refers to this as the *NetBIOS name* and must be 15 characters or less in length.
> Use only alphanumeric characters (that is, "A-Z", "a-z", and "0-9"), dashes ("-"), and dots (".");
> and, the first and last characters must be alphanumeric.
:end
Description:
_(Description)_:
: <input type="text" name="COMMENT" value="<?=htmlspecialchars($var['COMMENT'])?>" <?=$disabled?>>
:help56
> This is a text field that is seen next to a server when listed within Network or Network Neighborhood
> (Windows), or Finder (macOS).
:end
Model:
_(Model)_:
: <input type="text" name="SYS_MODEL" value="<?=htmlspecialchars($var['SYS_MODEL'])?>" <?=$disabled?>>
:help57
> This is the server model number.
:end
&nbsp;
: <input type="submit" name="changeNames" value="Apply" disabled><input type="button" value="Done" onclick="done()"><?if ($disabled):?>Array must be <span class="strong big">Stopped</span> to change<?endif;?>
: <input type="submit" name="changeNames" value="_(Apply)_" disabled><input type="button" value="_(Done)_" onclick="done()"><?if ($disabled):?>*_(Array must be **Stopped** to change)_*<?endif;?>
</form>
<script>
$("#NAME").keypress(function(event) {
return event.key.match(/[A-Za-z0-9\-\.]/)!==null;
return event.key.match(/[A-Za-z0-9\-\.]/)!==null;
});
$("#NAME").on("input change", function() {
if ($(this).val().match(/<?=$name_regex;?>/) === null) {
$('#name_warning').fadeIn('fast');
} else {
$('#name_warning').fadeOut('fast');
}
if ($(this).val().match(/<?=$name_regex;?>/) === null) {
$('#name_warning').fadeIn('fast');
} else {
$('#name_warning').fadeOut('fast');
}
});
</script>