Commit 95ba4111 authored by Ad Schellevis's avatar Ad Schellevis
parent e1f7b297
...@@ -197,10 +197,11 @@ include("head.inc"); ...@@ -197,10 +197,11 @@ include("head.inc");
if (add < 10) { if (add < 10) {
var TimeServerID = 'timeserver' + add; var TimeServerID = 'timeserver' + add;
document.getElementById(TimeServerID).style.display = 'block'; document.getElementById(TimeServerID).style.display = 'block';
//then revise the add another server line //then revise the add another server line
if (add < 9) { if (add < 9) {
var next = add + 1; var next = add + 1;
var newdiv = '<img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" title="<?php echo gettext("Add another Time server");?>" onclick="NewTimeServer(' + next + ')" alt="add" />\n'; var newdiv = '<a class="btn btn-default btn-xs" title="<?php echo gettext("Add another Time server");?>" onclick="NewTimeServer(' + next + ')" alt="add" ><span class="glyphicon glyphicon-plus"></span></a>\n';
document.getElementById('addserver').innerHTML=newdiv; document.getElementById('addserver').innerHTML=newdiv;
}else{ }else{
document.getElementById('addserver').style.display = 'none'; document.getElementById('addserver').style.display = 'none';
...@@ -296,7 +297,7 @@ include("head.inc"); ...@@ -296,7 +297,7 @@ include("head.inc");
} }
?> ?>
<div id="addserver"> <div id="addserver">
<img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" title="<?php echo gettext("Add another Time server");?>" onclick="NewTimeServer(<?php echo $j;?>)" alt="add" /> <a class="btn btn-default btn-xs" title="<?php echo gettext("Add another Time server");?>" onclick="NewTimeServer(<?php echo $j;?>)" alt="add" ><span class="glyphicon glyphicon-plus"></span> </a>
</div> </div>
<br /> <br />
<?php echo gettext('For best results three to five servers should be configured here.'); ?> <?php echo gettext('For best results three to five servers should be configured here.'); ?>
...@@ -367,7 +368,7 @@ include("head.inc"); ...@@ -367,7 +368,7 @@ include("head.inc");
<input name="nomodify" type="checkbox" class="formcheckbox" id="nomodify"<?php if(!$pconfig['nomodify']) echo " checked=\"checked\""; ?> /> <input name="nomodify" type="checkbox" class="formcheckbox" id="nomodify"<?php if(!$pconfig['nomodify']) echo " checked=\"checked\""; ?> />
<?php echo gettext("Deny state modifications (i.e. run time configuration) by ntpq and ntpdc (default: enabled)."); ?> <?php echo gettext("Deny state modifications (i.e. run time configuration) by ntpq and ntpdc (default: enabled)."); ?>
<br /> <br />
<input name="noquery" type="checkbox" class="formcheckbox" id="noquery"<?php if($pconfig['noquery']) echo " checked=\"checked\""; ?> />> <input name="noquery" type="checkbox" class="formcheckbox" id="noquery"<?php if($pconfig['noquery']) echo " checked=\"checked\""; ?> />
<?php echo gettext("Disable ntpq and ntpdc queries (default: disabled)."); ?> <?php echo gettext("Disable ntpq and ntpdc queries (default: disabled)."); ?>
<br /> <br />
<input name="noserve" type="checkbox" class="formcheckbox" id="noserve"<?php if($pconfig['noserve']) echo " checked=\"checked\""; ?> /> <input name="noserve" type="checkbox" class="formcheckbox" id="noserve"<?php if($pconfig['noserve']) echo " checked=\"checked\""; ?> />
......
...@@ -38,7 +38,7 @@ function set_default_gps() { ...@@ -38,7 +38,7 @@ function set_default_gps() {
unset($config['ntpd']['gps']); unset($config['ntpd']['gps']);
$config['ntpd']['gps'] = array(); $config['ntpd']['gps'] = array();
$config['ntpd']['gps']['type'] = 'Default'; $config['ntpd']['gps']['type'] = 'Generic';
/* copy an existing configured GPS port if it exists, the unset may be uncommented post production */ /* copy an existing configured GPS port if it exists, the unset may be uncommented post production */
if (!empty($config['ntpd']['gpsport']) && empty($config['ntpd']['gps']['port'])) { if (!empty($config['ntpd']['gpsport']) && empty($config['ntpd']['gps']['port'])) {
$config['ntpd']['gps']['port'] = $config['ntpd']['gpsport']; $config['ntpd']['gps']['port'] = $config['ntpd']['gpsport'];
...@@ -89,9 +89,9 @@ if ($_POST) { ...@@ -89,9 +89,9 @@ if ($_POST) {
elseif (isset($config['ntpd']['gps']['stratum'])) elseif (isset($config['ntpd']['gps']['stratum']))
unset($config['ntpd']['gps']['stratum']); unset($config['ntpd']['gps']['stratum']);
if (empty($_POST['gpsprefer'])) if (empty($_POST['gpsprefer'])) {
$config['ntpd']['gps']['prefer'] = 'on'; $config['ntpd']['gps']['prefer'] = 'on';
elseif (isset($config['ntpd']['gps']['prefer'])) } elseif (isset($config['ntpd']['gps']['prefer']))
unset($config['ntpd']['gps']['prefer']); unset($config['ntpd']['gps']['prefer']);
if (!empty($_POST['gpsselect'])) if (!empty($_POST['gpsselect']))
...@@ -99,11 +99,12 @@ if ($_POST) { ...@@ -99,11 +99,12 @@ if ($_POST) {
elseif (isset($config['ntpd']['gps']['noselect'])) elseif (isset($config['ntpd']['gps']['noselect']))
unset($config['ntpd']['gps']['noselect']); unset($config['ntpd']['gps']['noselect']);
if (!empty($_POST['gpsflag1'])) if (!empty($_POST['gpsflag1'])) {
$config['ntpd']['gps']['flag1'] = $_POST['gpsflag1']; $config['ntpd']['gps']['flag1'] = $_POST['gpsflag1'];
elseif (isset($config['ntpd']['gps']['flag1'])) } elseif (isset($config['ntpd']['gps']['flag1'])) {
unset($config['ntpd']['gps']['flag1']); unset($config['ntpd']['gps']['flag1']);
}
if (!empty($_POST['gpsflag2'])) if (!empty($_POST['gpsflag2']))
$config['ntpd']['gps']['flag2'] = $_POST['gpsflag2']; $config['ntpd']['gps']['flag2'] = $_POST['gpsflag2'];
elseif (isset($config['ntpd']['gps']['flag2'])) elseif (isset($config['ntpd']['gps']['flag2']))
...@@ -387,7 +388,7 @@ SureGPS = #Sure Electronics SKG16B ...@@ -387,7 +388,7 @@ SureGPS = #Sure Electronics SKG16B
<select id="gpstype" name="gpstype" class="formselect" onchange="set_gps_default(this.form)"> <select id="gpstype" name="gpstype" class="formselect" onchange="set_gps_default(this.form)">
<option value="Custom"<?php if($pconfig['type'] == 'Custom') echo " selected=\"selected\""; ?>>Custom</option> <option value="Custom"<?php if($pconfig['type'] == 'Custom') echo " selected=\"selected\""; ?>>Custom</option>
<option value="Default"<?php if($pconfig['type'] == 'Default') echo " selected=\"selected\""; ?>>Default</option> <option value="Default"<?php if($pconfig['type'] == 'Default') echo " selected=\"selected\""; ?>>Default</option>
<option value="Generic" title="Generic"<?php if($pconfig['type'] == 'Generic') echo " selected=\"selected\"";?>>Generic</option> <option value="Generic" title="Generic"<?php if($pconfig['type'] == 'Generic' ) echo " selected=\"selected\"";?>>Generic</option>
<option value="Garmin" title="$PGRM... Most Garmin"<?php if($pconfig['type'] == 'Garmin') echo " selected=\"selected\"";?>>Garmin</option> <option value="Garmin" title="$PGRM... Most Garmin"<?php if($pconfig['type'] == 'Garmin') echo " selected=\"selected\"";?>>Garmin</option>
<option value="MediaTek" title="$PMTK... Adafruit, Fastrax, some Garmin and others"<?php if($pconfig['type'] == 'MediaTek') echo " selected=\"selected\"";?>>MediaTek</option> <option value="MediaTek" title="$PMTK... Adafruit, Fastrax, some Garmin and others"<?php if($pconfig['type'] == 'MediaTek') echo " selected=\"selected\"";?>>MediaTek</option>
<option value="SiRF" title="$PSRF... Used by many devices"<?php if($pconfig['type'] == 'sirf') echo " selected=\"selected\"";?>>SiRF</option> <option value="SiRF" title="$PSRF... Used by many devices"<?php if($pconfig['type'] == 'sirf') echo " selected=\"selected\"";?>>SiRF</option>
...@@ -396,8 +397,7 @@ SureGPS = #Sure Electronics SKG16B ...@@ -396,8 +397,7 @@ SureGPS = #Sure Electronics SKG16B
</select> <?php echo gettext("This option allows you to select a predefined configuration.");?> </select> <?php echo gettext("This option allows you to select a predefined configuration.");?>
<br /> <br />
<br /> <br />
<strong><?php echo gettext("Note: ");?></strong><?php echo gettext("Default is the configuration of pfSense 2.1 and earlier"); ?> <strong><?php echo gettext("Note: ");?></strong><?php echo gettext("Select Generic if your GPS is not listed."); ?><br />
<?php echo gettext(" (not recommended). Select Generic if your GPS is not listed.)"); ?><br />
<strong><?php echo gettext("Note: ");?></strong><?php echo gettext("The perdefined configurations assume your GPS has already been set to NMEA mode."); ?> <strong><?php echo gettext("Note: ");?></strong><?php echo gettext("The perdefined configurations assume your GPS has already been set to NMEA mode."); ?>
</td> </td>
</tr> </tr>
...@@ -585,7 +585,11 @@ SureGPS = #Sure Electronics SKG16B ...@@ -585,7 +585,11 @@ SureGPS = #Sure Electronics SKG16B
<script type="text/javascript"> <script type="text/javascript">
//<![CDATA[ //<![CDATA[
set_gps_default(this.form); jQuery(document).ready(function() {
setTimeout(function(){
set_gps_default(this.form);
}, 1000);
});
//]]> //]]>
</script> </script>
<?php include("foot.inc"); ?> <?php include("foot.inc"); ?>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment