mirror of
https://github.com/RaspAP/raspap-webgui.git
synced 2024-11-21 23:20:22 +00:00
Add 802.11ac tooltip help text, update messages + compile .mo
This commit is contained in:
parent
9bc54336c2
commit
e95f12e91e
6 changed files with 30 additions and 21 deletions
|
@ -2,6 +2,7 @@
|
|||
|
||||
require '../../includes/csrf.php';
|
||||
require_once '../../includes/config.php';
|
||||
require_once '../../includes/locale.php';
|
||||
|
||||
if (isset($_POST['interface'])) {
|
||||
|
||||
|
@ -25,16 +26,16 @@ if (isset($_POST['interface'])) {
|
|||
|
||||
switch ($flags) {
|
||||
case NL80211_BAND_24GHZ:
|
||||
$msg = _("The selected interface has support for the 2.4 GHz wireless band only.");
|
||||
break;
|
||||
$msg = sprintf(_("The selected interface (%s) has support for the 2.4 GHz wireless band only."), $iface);
|
||||
break;
|
||||
case NL80211_BAND_5GHZ:
|
||||
$msg = _("The selected interface has support for the 5 GHz wireless band only.");
|
||||
$msg = sprintf(_("The selected interface (%s) has support for the 5 GHz wireless band only."), $iface);
|
||||
break;
|
||||
case NL80211_BAND_24GHZ | NL80211_BAND_5GHZ:
|
||||
$msg = _("The selected interface has support for both the 2.4 and 5 GHz wireless bands.");
|
||||
$msg = sprintf(_("The selected interface (%s) has support for both the 2.4 and 5 GHz wireless bands."), $iface);
|
||||
break;
|
||||
default:
|
||||
$msg = _("The selected interface does not support wireless mode operation.");
|
||||
$msg = sprintf(_("The selected interface (%s) does not support wireless mode operation."), $iface);
|
||||
}
|
||||
echo json_encode($msg);
|
||||
}
|
||||
|
|
|
@ -389,13 +389,17 @@ function loadChannelSelect(selected) {
|
|||
}
|
||||
|
||||
/* Sets hardware mode tooltip text for selected interface.
|
||||
* Messages are sent from ajax request for gettext locale support.
|
||||
*/
|
||||
function setHardwareModeTooltip() {
|
||||
var iface = $('#cbxinterface').val();
|
||||
var hwmodeText = '';
|
||||
// Explanatory text if 802.11ac is disabled
|
||||
if ($('#cbxhwmode').find('option[value="ac"]').prop('disabled') == true ) {
|
||||
var hwmodeText = $('#hwmode').attr('data-tooltip');
|
||||
}
|
||||
$.post('ajax/networking/get_frequencies.php?',{'interface': iface},function(data){
|
||||
responseText = JSON.parse(data);
|
||||
$('#tiphwmode').attr('data-original-title', responseText);
|
||||
var responseText = JSON.parse(data);
|
||||
$('#tiphwmode').attr('data-original-title', responseText + '\n' + hwmodeText );
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -796,10 +796,11 @@ function get_public_ip()
|
|||
*
|
||||
* @return string $tooltip
|
||||
*/
|
||||
function getTooltip($msg, $id, $visible = true)
|
||||
function getTooltip($msg, $id, $visible = true, $data_html = false)
|
||||
{
|
||||
($visible) ? $opt = 'visible' : $opt = 'invisible';
|
||||
$tooltip = '<i class="fas fa-question-circle text-muted ' .$opt.'" id="' .$id. '" data-toggle="tooltip" data-placement="auto" title="' . _($msg). '"></i>';
|
||||
($visible) ? $opt1 = 'visible' : $opt1 = 'invisible';
|
||||
($data_html) ? $opt2 = 'data-html="true"' : $opt2 = 'data-html="false"';
|
||||
$tooltip = '<i class="fas fa-question-circle text-muted ' .$opt1.'" id="' .$id. '" data-toggle="tooltip" ' .$opt2. ' data-placement="auto" title="' . _($msg). '"></i>';
|
||||
return $tooltip;
|
||||
}
|
||||
|
||||
|
|
Binary file not shown.
|
@ -585,17 +585,20 @@ msgstr "Sets the <code>txpower</code> option for the AP interface and the config
|
|||
msgid "dBm is a unit of level used to indicate that a power ratio is expressed in decibels (dB) with reference to one milliwatt (mW). 30 dBm is equal to 1000 mW, while 0 dBm equals 1.25 mW."
|
||||
msgstr "dBm is a unit of level used to indicate that a power ratio is expressed in decibels (dB) with reference to one milliwatt (mW). 30 dBm is equal to 1000 mW, while 0 dBm equals 1.25 mW."
|
||||
|
||||
msgid "The selected interface has support for the 2.4 GHz wireless band only."
|
||||
msgstr "The selected interface has support for the 2.4 GHz wireless band only."
|
||||
msgid "The selected interface (%s) has support for the 2.4 GHz wireless band only."
|
||||
msgstr "The selected interface (%s) has support for the 2.4 GHz wireless band only."
|
||||
|
||||
msgid "The selected interface has support for the 2.5 GHz wireless band only."
|
||||
msgstr "The selected interface has support for the 2.5 GHz wireless band only."
|
||||
msgid "The selected interface (%s) has support for the 2.5 GHz wireless band only."
|
||||
msgstr "The selected interface (%s) has support for the 2.5 GHz wireless band only."
|
||||
|
||||
msgid "The selected interface has support for both the 2.4 and 5 GHz wireless bands."
|
||||
msgstr "The selected interface has support for both the 2.4 and 5 GHz wireless bands."
|
||||
msgid "The selected interface (%s) has support for both the 2.4 and 5 GHz wireless bands."
|
||||
msgstr "The selected interface (%s) has support for both the 2.4 and 5 GHz wireless bands."
|
||||
|
||||
msgid "The selected interface does not support wireless mode operation."
|
||||
msgstr "The selected interface does not support wireless mode operation."
|
||||
msgid "The selected interface (%s) does not support wireless mode operation."
|
||||
msgstr "The selected interface (%s) does not support wireless mode operation."
|
||||
|
||||
msgid "The 802.11ac 5 GHz option is disabled until a compatible wireless regulatory domain is set."
|
||||
msgstr "The 802.11ac 5 GHz option is disabled until a compatible wireless regulatory domain is set."
|
||||
|
||||
#: includes/networking.php
|
||||
msgid "Summary"
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<div class="row">
|
||||
<div class="form-group col-md-6">
|
||||
<label for="cbxhwmode"><?php echo _("Wireless Mode") ;?></label>
|
||||
<?php echo getTooltip('Initial state.', 'tiphwmode', true); ?>
|
||||
<?php echo getTooltip(null, 'tiphwmode', true); ?>
|
||||
<?php
|
||||
$countries_5Ghz_max48ch = RASPI_5GHZ_ISO_ALPHA2;
|
||||
$selectedHwMode = $arrConfig['hw_mode'];
|
||||
|
@ -36,7 +36,6 @@
|
|||
$selectedHwMode = 'w';
|
||||
}
|
||||
}
|
||||
|
||||
if (!in_array($arrConfig['country_code'], $countries_5Ghz_max48ch)) {
|
||||
$hwModeDisabled = 'ac';
|
||||
if ($selectedHwMode === $hwModeDisabled) {
|
||||
|
@ -44,6 +43,7 @@
|
|||
}
|
||||
}
|
||||
SelectorOptions('hw_mode', $arr80211Standard, $selectedHwMode, 'cbxhwmode', 'loadChannelSelect', $hwModeDisabled); ?>
|
||||
<div id="hwmode" data-tooltip="<?php echo _("The 802.11ac 5 GHz option is disabled until a compatible wireless regulatory domain is set."); ?>"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
|
Loading…
Reference in a new issue