Skip to content

Commit

Permalink
Fixed #6716
Browse files Browse the repository at this point in the history
  • Loading branch information
sbeaver-netgate committed Aug 15, 2016
1 parent b2bc698 commit 4d4782f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
13 changes: 11 additions & 2 deletions src/usr/local/www/js/pfSenseHelpers.js
Expand Up @@ -189,17 +189,20 @@ function setMasks() {
// Complicated function to move all help text associated with this input id to the same id
// on the row above. That way if you delete the last row, you don't lose the help
function moveHelpText(id) {
$('#' + id).parent('div').parent('div').find('input, select, checkbox').each(function() { // For each <span></span>

$('#' + id).parent('div').parent('div').find('input, select, checkbox, button').each(function() { // For each <span></span>
var fromId = this.id;
var toId = decrStringInt(fromId);
var helpSpan;

if (!$(this).hasClass('pfIpMask') && !$(this).hasClass('btn')) {

if (!$(this).hasClass('pfIpMask') && !$(this).hasClass('btn') && ! fromId.startsWith("mask")) {
if ($('#' + decrStringInt(fromId)).parent('div').hasClass('input-group')) {
helpSpan = $('#' + fromId).parent('div').parent('div').find('span:last').clone();
} else {
helpSpan = $('#' + fromId).parent('div').find('span:last').clone();
}

if ($(helpSpan).hasClass('help-block')) {
if ($('#' + decrStringInt(fromId)).parent('div').hasClass('input-group')) {
$('#' + decrStringInt(fromId)).parent('div').after(helpSpan);
Expand Down Expand Up @@ -248,6 +251,11 @@ function renumber() {
$(this).prop("name", this.name.replace(/\d+$/, "") + idx);
});

$(this).find('button').each(function() {
$(this).prop("id", this.id.replace(/\d+$/, "") + idx);
$(this).prop("name", this.name.replace(/\d+$/, "") + idx);
});

// $(this).find('label').attr('for', $(this).find('label').attr('for').replace(/\d+$/, "") + idx);

idx++;
Expand All @@ -263,6 +271,7 @@ function delete_row(rowDelBtn) {
}

$('#' + rowDelBtn).parent('div').parent('div').remove();

renumber();
checkLastRow();

Expand Down
11 changes: 8 additions & 3 deletions src/usr/local/www/services_unbound_acls.php
Expand Up @@ -169,7 +169,7 @@
sprintf(gettext('%sDeny:%s Stops queries from hosts within the netblock defined below.%s'), '<span class="text-success"><strong>', '</strong></span>', '<br />') .
sprintf(gettext('%sRefuse:%s Stops queries from hosts within the netblock defined below, but sends a DNS rcode REFUSED error message back to the client.%s'), '<span class="text-success"><strong>', '</strong></span>', '<br />') .
sprintf(gettext('%sAllow:%s Allow queries from hosts within the netblock defined below.%s'), '<span class="text-success"><strong>', '</strong></span>', '<br />') .
sprintf(gettext('%sAllow Snoop:%s Allow recursive and nonrecursive access from hosts within the netblock defined below. Used for cache snooping and ideally should only be configured for the administrative host.'), '<span class="text-success"><strong>', '</strong></span>');
sprintf(gettext('%sAllow Snoop:%s Allow recursive and nonrecursive access from hosts within the netblock defined below. Used for cache snooping and ideally should only be configured for the administrative host.'), '<span class="text-success"><strong>', '</strong></span>');

$pgtitle = array(gettext("Services"), gettext("DNS Resolver"), gettext("Access Lists"));

Expand Down Expand Up @@ -336,15 +336,20 @@
</a>
</nav>

<?php
}

?>
<script type="text/javascript">
//<![CDATA[
events.push(function() {

// Suppress "Delete row" button if there are fewer than two rows
checkLastRow();

});
//]]>
</script>
<?php
}

<?php
include("foot.inc");

0 comments on commit 4d4782f

Please sign in to comment.