Commit 3611e7fb authored by Ad Schellevis's avatar Ad Schellevis

(unbound) move outgoing_interface to advanced, closes https://github.com/opnsense/core/issues/881

parent 02c2b33c
...@@ -117,12 +117,17 @@ include_once("head.inc"); ...@@ -117,12 +117,17 @@ include_once("head.inc");
<body> <body>
<script type="text/javascript"> <script type="text/javascript">
//<![CDATA[ $( document ).ready(function() {
function show_advanced_dns() { $("#show_advanced_dns").click(function(){
$("#showadv").show(); $(this).parent().parent().hide();
$("#showadvbox").hide(); $(".showadv").show();
} $(window).trigger('resize');
//]]> })
// show advanced when option set
if ($("#outgoing_interface").val() != "" || $("#custom_options").val() != "") {
$("#show_advanced_dns").click();
}
});
</script> </script>
<?php include("fbegin.inc"); ?> <?php include("fbegin.inc"); ?>
<section class="page-content-main"> <section class="page-content-main">
...@@ -180,25 +185,6 @@ function show_advanced_dns() { ...@@ -180,25 +185,6 @@ function show_advanced_dns() {
</div> </div>
</td> </td>
</tr> </tr>
<tr>
<td><a id="help_for_outgoing_interface" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Outgoing Network Interfaces"); ?></td>
<td>
<select name="outgoing_interface[]" multiple="multiple" size="3" class="selectpicker" data-live-search="true">
<option value="" <?=empty($pconfig['outgoing_interface'][0]) ? 'selected="selected"' : ""; ?>><?=gettext("All");?></option>
<?php
foreach (get_possible_listen_ips(true) as $laddr):?>
<option value="<?=$laddr['value'];?>" <?=in_array($laddr['value'], $pconfig['outgoing_interface']) ? 'selected="selected"' : "";?>>
<?=htmlspecialchars($laddr['name']);?>
</option>
<?php
endforeach; ?>
</select>
<div class="hidden" for="help_for_outgoing_interface">
<?=gettext("Utilize different network interface(s) that the DNS Resolver will use to send queries to authoritative servers and receive their replies. By default all interfaces are used.");?>
</div>
</td>
</tr>
<tr> <tr>
<td><i class="fa fa-info-circle text-muted"></i> <?=gettext("DNSSEC");?></td> <td><i class="fa fa-info-circle text-muted"></i> <?=gettext("DNSSEC");?></td>
<td> <td>
...@@ -252,13 +238,33 @@ function show_advanced_dns() { ...@@ -252,13 +238,33 @@ function show_advanced_dns() {
<tr> <tr>
<td><i class="fa fa-info-circle text-muted"></i> <?=gettext("Advanced");?></td> <td><i class="fa fa-info-circle text-muted"></i> <?=gettext("Advanced");?></td>
<td> <td>
<div id="showadvbox" <?=!empty($pconfig['custom_options']) ? "style='display:none'" : ""; ?>> <input id="show_advanced_dns" type="button" class="btn btn-xs btn-default" value="<?=gettext("Advanced"); ?>" /> - <?=gettext("Show advanced option");?>
<input type="button" class="btn btn-xs btn-default" onclick="show_advanced_dns()" value="<?=gettext("Advanced"); ?>" /> - <?=gettext("Show advanced option");?> </td>
</div> </tr>
<div id="showadv" <?=empty($pconfig['custom_options']) ? "style='display:none'" : ""; ?>> <tr class="showadv" style="display:none">
<strong><?=gettext("Advanced");?><br /></strong> <td><i class="fa fa-info-circle text-muted"></i> <?=gettext("Advanced");?></td>
<textarea rows="6" cols="78" name="custom_options" id="custom_options"><?=$pconfig['custom_options'];?></textarea><br /> <td>
<?=gettext("Enter any additional options you would like to add to the DNS Resolver configuration here, separated by a space or newline"); ?><br /> <strong><?=gettext("Advanced");?><br /></strong>
<textarea rows="6" cols="78" name="custom_options" id="custom_options"><?=$pconfig['custom_options'];?></textarea><br />
<?=gettext("Enter any additional options you would like to add to the DNS Resolver configuration here, separated by a space or newline"); ?><br />
</td>
</tr>
<tr class="showadv" style="display:none">
<td><a id="help_for_outgoing_interface" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Outgoing Network Interfaces"); ?></td>
<td>
<select id="outgoing_interface" name="outgoing_interface[]" multiple="multiple" size="3" class="selectpicker" data-live-search="true">
<option value="" <?=empty($pconfig['outgoing_interface'][0]) ? 'selected="selected"' : ""; ?>><?=gettext("All");?></option>
<?php
foreach (get_possible_listen_ips(true) as $laddr):?>
<option value="<?=$laddr['value'];?>" <?=in_array($laddr['value'], $pconfig['outgoing_interface']) ? 'selected="selected"' : "";?>>
<?=htmlspecialchars($laddr['name']);?>
</option>
<?php
endforeach; ?>
</select>
<div class="hidden" for="help_for_outgoing_interface">
<?=gettext("Utilize different network interface(s) that the DNS Resolver will use to send queries to authoritative servers and receive their replies. By default all interfaces are used.");?>
</div> </div>
</td> </td>
</tr> </tr>
......
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