summaryrefslogtreecommitdiffstats
path: root/usr/local/www/services_ntpd_gps.php
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2014-08-05 10:01:37 -0300
committerRenato Botelho <garga@FreeBSD.org>2014-08-05 10:01:37 -0300
commit8e2a409171011bfc14149c5fa533d938f49eebba (patch)
tree6508d0253a80fa1758ea01f4706058120840121b /usr/local/www/services_ntpd_gps.php
parentf9f3e44c62eb865094a43fbfb66c0118be18d5f0 (diff)
downloadpfsense-8e2a409171011bfc14149c5fa533d938f49eebba.zip
pfsense-8e2a409171011bfc14149c5fa533d938f49eebba.tar.gz
Use GPS type presets only to pre-set values then user can change it. After user changes, save type always as Custom to avoid overwriting values when user attempt to edit. It fixes #3782
Diffstat (limited to 'usr/local/www/services_ntpd_gps.php')
-rw-r--r--usr/local/www/services_ntpd_gps.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/usr/local/www/services_ntpd_gps.php b/usr/local/www/services_ntpd_gps.php
index 7586b62..84cee47 100644
--- a/usr/local/www/services_ntpd_gps.php
+++ b/usr/local/www/services_ntpd_gps.php
@@ -70,7 +70,7 @@ if ($_POST) {
else unset($config['ntpd']['gps']);
if (!empty($_POST['gpstype']))
- $config['ntpd']['gps']['type'] = $_POST['gpstype'];
+ $config['ntpd']['gps']['type'] = 'Custom';
elseif (isset($config['ntpd']['gps']['type']))
unset($config['ntpd']['gps']['type']);
@@ -314,8 +314,9 @@ SureGPS = #Sure Electronics SKG16B
gpsdef['fudge2'] = "0.407";
gpsdef['inittxt'] = "JFBNVEsyMjUsMCoyQg0KJFBNVEszMTQsMSwxLDAsMSwwLDUsMCwwLDAsMCwwLDAsMCwwLDAsMCwwLDEsMCoyRA0KJFBNVEszMDEsMioyRQ0KJFBNVEszOTcsMCoyMw0KJFBNVEsxMDIqMzENCiRQTVRLMzEzLDEqMkUNCiRQTVRLNTEzLDEqMjgNCiRQTVRLMzE5LDAqMjUNCiRQTVRLNTI3LDAuMDAqMDANCiRQTVRLMjUxLDk2MDAqMTcNCg==";
break;
-
- }
+ default:
+ return;
+ }
//then update the html and set the common stuff
document.getElementById("gpsnmea").selectedIndex = gpsdef['nmea'];
@@ -386,6 +387,7 @@ SureGPS = #Sure Electronics SKG16B
<td width="78%" valign="top" class="vtable">
<!-- Start with the original "Default", list a "Generic" and then specific configs alphabetically -->
<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="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="Garmin" title="$PGRM... Most Garmin"<?php if($pconfig['type'] == 'Garmin') echo " selected=\"selected\"";?>>Garmin</option>
OpenPOWER on IntegriCloud