diff options
author | Stephen Beaver <sbeaver@netgate.com> | 2016-08-15 14:47:05 -0400 |
---|---|---|
committer | Stephen Beaver <sbeaver@netgate.com> | 2016-08-15 14:54:12 -0400 |
commit | eb53e87330d1928ad7c3fe1425cd2b29590d171b (patch) | |
tree | a0eff0024f2ca609e87b4633137d7c6250bb7206 /src/usr/local/www | |
parent | 0e0633070204e55935539c360e38011b4dcdb7a0 (diff) | |
download | pfsense-eb53e87330d1928ad7c3fe1425cd2b29590d171b.zip pfsense-eb53e87330d1928ad7c3fe1425cd2b29590d171b.tar.gz |
Fixed #6716
(cherry picked from commit 4d4782fcd7213b5f279cb372853f5fedb07f6178)
Diffstat (limited to 'src/usr/local/www')
-rw-r--r-- | src/usr/local/www/js/pfSenseHelpers.js | 13 | ||||
-rw-r--r-- | 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 db5b40e..e5f3b43 100644 --- a/src/usr/local/www/js/pfSenseHelpers.js +++ b/src/usr/local/www/js/pfSenseHelpers.js @@ -221,17 +221,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); @@ -280,6 +283,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++; @@ -295,6 +303,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 68dd774..d2abeca 100644 --- a/src/usr/local/www/services_unbound_acls.php +++ b/src/usr/local/www/services_unbound_acls.php @@ -201,7 +201,7 @@ $actionHelp = 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")); @@ -368,15 +368,20 @@ if ($act == "new" || $act == "edit") { </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"); |