From 4d4782fcd7213b5f279cb372853f5fedb07f6178 Mon Sep 17 00:00:00 2001 From: Stephen Beaver Date: Mon, 15 Aug 2016 14:47:05 -0400 Subject: [PATCH] Fixed #6716 --- src/usr/local/www/js/pfSenseHelpers.js | 13 +++++++++++-- src/usr/local/www/services_unbound_acls.php | 11 ++++++++--- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/src/usr/local/www/js/pfSenseHelpers.js b/src/usr/local/www/js/pfSenseHelpers.js index bcedd059629..2581fbc86a1 100644 --- a/src/usr/local/www/js/pfSenseHelpers.js +++ b/src/usr/local/www/js/pfSenseHelpers.js @@ -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 + + $('#' + id).parent('div').parent('div').find('input, select, checkbox, button').each(function() { // For each 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); @@ -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++; @@ -263,6 +271,7 @@ function delete_row(rowDelBtn) { } $('#' + rowDelBtn).parent('div').parent('div').remove(); + renumber(); checkLastRow(); diff --git a/src/usr/local/www/services_unbound_acls.php b/src/usr/local/www/services_unbound_acls.php index cd0f1c3089e..fdaf0b2bb57 100644 --- a/src/usr/local/www/services_unbound_acls.php +++ b/src/usr/local/www/services_unbound_acls.php @@ -169,7 +169,7 @@ sprintf(gettext('%sDeny:%s Stops queries from hosts within the netblock defined below.%s'), '', '', '
') . 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'), '', '', '
') . sprintf(gettext('%sAllow:%s Allow queries from hosts within the netblock defined below.%s'), '', '', '
') . - 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.'), '', ''); + 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.'), '', ''); $pgtitle = array(gettext("Services"), gettext("DNS Resolver"), gettext("Access Lists")); @@ -336,15 +336,20 @@ + -