1
0
mirror of https://github.com/billz/raspap-webgui.git synced 2023-10-10 13:37:24 +02:00

added checkbox for no-resolv option in dnsmasq.conf

This commit is contained in:
glaszig 2020-02-29 18:33:51 +01:00
parent a3c8def120
commit 6bb4abac56
2 changed files with 12 additions and 0 deletions

View File

@ -59,6 +59,9 @@ function DisplayDHCPConfig()
} }
} }
if ($_POST['no-resolv'] == "1") {
$config .= "no-resolv".PHP_EOL;
}
foreach ($_POST['server'] as $server) { foreach ($_POST['server'] as $server) {
$config .= "server=$server".PHP_EOL; $config .= "server=$server".PHP_EOL;
} }

View File

@ -88,6 +88,15 @@
<div class="col-md-6"> <div class="col-md-6">
<label class="form-label"><?php echo _("Upstream DNS servers") ?></label> <label class="form-label"><?php echo _("Upstream DNS servers") ?></label>
<div class="form-check">
<input type="hidden" name="no-resolv" value="0">
<input class="form-check-input" id="no-resolv" type="checkbox" name="no-resolv" value="1" <?php echo $conf['no-resolv'] ? ' checked="checked"' : "" ?> aria-describedby="no-resolv-description">
<label for="no-resolv"><?php echo _("Do not use upstream DNS supplied from DHCP server") ?></label>
<p id="no-resolv-description">
<small><?php echo _("Enable this option if you want RaspAP to <b>send DNS queries to the servers configured below exclusively</b>. By default RaspAP also uses its upstream DHCP server's name servers.") ?></small>
</p>
</div>
<div class="js-dhcp-upstream-servers"> <div class="js-dhcp-upstream-servers">
<?php foreach ($upstreamServers as $server): ?> <?php foreach ($upstreamServers as $server): ?>
<div class="form-group input-group js-dhcp-upstream-server"> <div class="form-group input-group js-dhcp-upstream-server">