summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Beaver <sbeaver@netgate.com>2016-08-15 14:47:05 -0400
committerStephen Beaver <sbeaver@netgate.com>2016-08-15 14:48:48 -0400
commit4d4782fcd7213b5f279cb372853f5fedb07f6178 (patch)
treed79d1bc4689abd087a07a82d1e38e1b19610258b
parentb2bc698135f27cfb4af6c39171c8ec4e40216f05 (diff)
downloadpfsense-4d4782fcd7213b5f279cb372853f5fedb07f6178.zip
pfsense-4d4782fcd7213b5f279cb372853f5fedb07f6178.tar.gz
Fixed #6716
-rw-r--r--src/usr/local/www/js/pfSenseHelpers.js13
-rw-r--r--src/usr/local/www/services_unbound_acls.php11
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 bcedd05..2581fbc 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 <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);
@@ -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 cd0f1c3..fdaf0b2 100644
--- a/src/usr/local/www/services_unbound_acls.php
+++ b/src/usr/local/www/services_unbound_acls.php
@@ -169,7 +169,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"));
@@ -336,15 +336,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");
OpenPOWER on IntegriCloud