Skip to content

Commit

Permalink
Default DNS setting to DHCP since that's the default with no config.
Browse files Browse the repository at this point in the history
  • Loading branch information
cpinkham committed Jun 4, 2014
1 parent f190bf7 commit e5d5442
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions www/networkconfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,8 @@ function GetDNSInfo(data)
$('#dns1').val(data.DNS1);
$('#dns2').val(data.DNS2);

if ((data.DNS1 != "") || (data.DNS2 != ""))
if ((typeof data.DNS1 !== "undefined" && data.DNS1 != "") ||
(typeof data.DNS2 !== "undefined" && data.DNS2 != ""))
{
$('#dns_manual').prop('checked', true);
$('#dns_dhcp').prop('checked', false);
Expand Down Expand Up @@ -398,7 +399,7 @@ function DisableDNSFields(disabled)
<td>DNS Server Mode:</td>
<td><label><input type="radio" id ="dns_manual" value="manual">
Manual</label>
<label><input type="radio" id ="dns_dhcp" value="dhcp">
<label><input type="radio" id ="dns_dhcp" value="dhcp" checked>
DHCP</label>
<br>
</td>
Expand Down

0 comments on commit e5d5442

Please sign in to comment.