summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRoss Williams <ross@ross-williams.net>2016-11-29 22:21:55 -0500
committerRenato Botelho <renato@netgate.com>2016-12-02 14:00:29 -0200
commit149575ae78f6903108f6a162bec5cbfe4b5f27f2 (patch)
tree54d7e69d6cbfaf0fed6a2cab53380748695968c4 /src
parent8960e39700011c9a796aea20cc3146f7bab4594c (diff)
downloadpfsense-149575ae78f6903108f6a162bec5cbfe4b5f27f2.zip
pfsense-149575ae78f6903108f6a162bec5cbfe4b5f27f2.tar.gz
Add ddnsforcehostname option to Static Mapping editor
(cherry picked from commit 62abab65c9c3fb010862201b327b426b3b9fc3b8)
Diffstat (limited to 'src')
-rw-r--r--src/usr/local/www/services_dhcp_edit.php13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/usr/local/www/services_dhcp_edit.php b/src/usr/local/www/services_dhcp_edit.php
index 9eff1c0..f597be1 100644
--- a/src/usr/local/www/services_dhcp_edit.php
+++ b/src/usr/local/www/services_dhcp_edit.php
@@ -142,6 +142,7 @@ if (isset($id) && $a_maps[$id]) {
$pconfig['ddnsdomainkeyname'] = $a_maps[$id]['ddnsdomainkeyname'];
$pconfig['ddnsdomainkey'] = $a_maps[$id]['ddnsdomainkey'];
$pconfig['ddnsupdate'] = isset($a_maps[$id]['ddnsupdate']);
+ $pconfig['ddnsforcehostname'] = isset($a_maps[$id]['ddnsforcehostname']);
list($pconfig['ntp1'], $pconfig['ntp2']) = $a_maps[$id]['ntpserver'];
$pconfig['tftp'] = $a_maps[$id]['tftp'];
} else {
@@ -168,6 +169,7 @@ if (isset($id) && $a_maps[$id]) {
$pconfig['ddnsdomainkeyname'] = $_GET['ddnsdomainkeyname'];
$pconfig['ddnsdomainkey'] = $_GET['ddnsdomainkey'];
$pconfig['ddnsupdate'] = isset($_GET['ddnsupdate']);
+ $pconfig['ddnsforcehostname'] = isset($_GET['ddnsforcehostname']);
$pconfig['ntp1'] = $_GET['ntp1'];
$pconfig['ntp2'] = $_GET['ntp2'];
$pconfig['tftp'] = $_GET['tftp'];
@@ -363,6 +365,7 @@ if ($_POST) {
$mapent['ddnsdomainkeyname'] = $_POST['ddnsdomainkeyname'];
$mapent['ddnsdomainkey'] = $_POST['ddnsdomainkey'];
$mapent['ddnsupdate'] = ($_POST['ddnsupdate']) ? true : false;
+ $mapent['ddnsforcehostname'] = ($_POST['ddnsforcehostname']) ? true : false;
unset($mapent['ntpserver']);
if ($_POST['ntp1']) {
@@ -611,6 +614,13 @@ $section->addInput(new Form_Checkbox(
$pconfig['ddnsupdate']
));
+$section->addInput(new Form_Checkbox(
+ 'ddnsforcehostname',
+ 'DDNS Hostname',
+ 'Make dynamic DNS registered hostname the same as Hostname above.',
+ $pconfig['ddnsforcehostname']
+));
+
$section->addInput(new Form_Input(
'ddnsdomain',
'DDNS Domain',
@@ -712,7 +722,7 @@ events.push(function() {
// On page load decide the initial state based on the data.
if (ispageload) {
<?php
- if (!$pconfig['ddnsupdate'] && empty($pconfig['ddnsdomain']) && empty($pconfig['ddnsdomainprimary']) &&
+ if (!$pconfig['ddnsupdate'] && !$pconfig['ddnsforcehostname'] && empty($pconfig['ddnsdomain']) && empty($pconfig['ddnsdomainprimary']) &&
empty($pconfig['ddnsdomainkeyname']) && empty($pconfig['ddnsdomainkey'])) {
$showadv = false;
} else {
@@ -726,6 +736,7 @@ events.push(function() {
}
hideCheckbox('ddnsupdate', !showadvdns);
+ hideCheckbox('ddnsforcehostname', !showadvdns);
hideInput('ddnsdomain', !showadvdns);
hideInput('ddnsdomainprimary', !showadvdns);
hideInput('ddnsdomainkeyname', !showadvdns);
OpenPOWER on IntegriCloud