summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xsrc/usr/local/www/firewall_aliases_edit.php3
-rw-r--r--src/usr/local/www/jquery/pfSenseHelpers.js11
-rw-r--r--src/usr/local/www/pkg_edit.php5
-rw-r--r--src/usr/local/www/services_dhcp.php3
-rw-r--r--src/usr/local/www/services_ntpd.php3
-rw-r--r--src/usr/local/www/services_router_advertisements.php2
-rw-r--r--src/usr/local/www/services_unbound_acls.php9
-rw-r--r--src/usr/local/www/system_certmanager.php3
-rw-r--r--src/usr/local/www/vpn_pppoe_edit.php3
-rw-r--r--src/usr/local/www/widgets/widgets/wake_on_lan.widget.php8
10 files changed, 45 insertions, 5 deletions
diff --git a/src/usr/local/www/firewall_aliases_edit.php b/src/usr/local/www/firewall_aliases_edit.php
index 3b9cfaf..8f3198b 100755
--- a/src/usr/local/www/firewall_aliases_edit.php
+++ b/src/usr/local/www/firewall_aliases_edit.php
@@ -810,6 +810,9 @@ events.push(function(){
// On load . .
typechange();
+
+ // Suppress "Delete row" button if there are fewer than two rows
+ checkLastRow();
// Autocomplete
var addressarray = <?= json_encode(array_exclude($pconfig['name'], get_alias_list($pconfig['type']))) ?>;
diff --git a/src/usr/local/www/jquery/pfSenseHelpers.js b/src/usr/local/www/jquery/pfSenseHelpers.js
index 0668489..2a1d123 100644
--- a/src/usr/local/www/jquery/pfSenseHelpers.js
+++ b/src/usr/local/www/jquery/pfSenseHelpers.js
@@ -240,6 +240,15 @@ function renumber() {
function delete_row(row) {
$('#' + row).parent('div').parent('div').remove();
renumber();
+ checkLastRow();
+}
+
+function checkLastRow() {
+ if($('.repeatable').length <= 1) {
+ $('#deleterow0').hide();
+ } else {
+ $('[id^=deleterow]').show();
+ }
}
function add_row() {
@@ -289,6 +298,8 @@ function add_row() {
setMasks();
+ checkLastRow();
+
$('[id^=address]').autocomplete({
source: addressarray
});
diff --git a/src/usr/local/www/pkg_edit.php b/src/usr/local/www/pkg_edit.php
index ea04094..68886d7 100644
--- a/src/usr/local/www/pkg_edit.php
+++ b/src/usr/local/www/pkg_edit.php
@@ -1423,7 +1423,10 @@ if ($pkg['fields']['field'] != "") { ?>
// Hide on page load
$('.advancedoptions').hide();
- // But show it if you click the showadv button
+ // Suppress "Delete row" button if there are fewer than two rows
+ checkLastRow();
+
+ // Show advanced section if you click the showadv button
$('#showadv').prop('type', 'button');
$("#showadv").click(function() {
diff --git a/src/usr/local/www/services_dhcp.php b/src/usr/local/www/services_dhcp.php
index ca60cb4..a7446a8 100644
--- a/src/usr/local/www/services_dhcp.php
+++ b/src/usr/local/www/services_dhcp.php
@@ -1528,6 +1528,9 @@ events.push(function(){
show_advldap();
show_advboot();
show_advopts();
+
+ // Suppress "Delete row" button if there are fewer than two rows
+ checkLastRow();
});
//]]>
</script>
diff --git a/src/usr/local/www/services_ntpd.php b/src/usr/local/www/services_ntpd.php
index 36af8b7..6b368a4 100644
--- a/src/usr/local/www/services_ntpd.php
+++ b/src/usr/local/www/services_ntpd.php
@@ -554,6 +554,9 @@ events.push(function(){
hideCheckbox('notrap', true);
hideInput('leaptext', true);
hideInput('leapfile', true);
+
+ // Suppress "Delete row" button if there are fewer than two rows
+ checkLastRow();
});
//]]>
</script>
diff --git a/src/usr/local/www/services_router_advertisements.php b/src/usr/local/www/services_router_advertisements.php
index 8c001f9..05155a0 100644
--- a/src/usr/local/www/services_router_advertisements.php
+++ b/src/usr/local/www/services_router_advertisements.php
@@ -409,6 +409,8 @@ print($form);
<script>
//<![CDATA[
events.push(function(){
+ // Suppress "Delete row" button if there are fewer than two rows
+ checkLastRow();
// --------- Autocomplete -----------------------------------------------------------------------------------------
var addressarray = <?= json_encode(get_alias_list(array("host", "network", "openvpn", "urltable"))) ?>;
diff --git a/src/usr/local/www/services_unbound_acls.php b/src/usr/local/www/services_unbound_acls.php
index a9d1076..e428c25 100644
--- a/src/usr/local/www/services_unbound_acls.php
+++ b/src/usr/local/www/services_unbound_acls.php
@@ -325,6 +325,15 @@ else // NOT 'edit' or 'add'
</nav>
</div>
</div>
+
+<script>
+//<![CDATA[
+events.push(function(){
+ // Suppress "Delete row" button if there are fewer than two rows
+ checkLastRow();
+});
+//]]>
+</script>
<?php
}
diff --git a/src/usr/local/www/system_certmanager.php b/src/usr/local/www/system_certmanager.php
index 60d18aa..581cdd3 100644
--- a/src/usr/local/www/system_certmanager.php
+++ b/src/usr/local/www/system_certmanager.php
@@ -1096,6 +1096,9 @@ events.push(function(){
internalca_change();
+ // Suppress "Delete row" button if there are fewer than two rows
+ checkLastRow();
+
<?php endif; ?>
diff --git a/src/usr/local/www/vpn_pppoe_edit.php b/src/usr/local/www/vpn_pppoe_edit.php
index d6540a5..1f146e6 100644
--- a/src/usr/local/www/vpn_pppoe_edit.php
+++ b/src/usr/local/www/vpn_pppoe_edit.php
@@ -625,6 +625,9 @@ events.push(function(){
hide_radius2(!$('#radiussecenable').prop('checked'));
hide_radius(!$('#radiusenable').prop('checked'));
+ // Suppress "Delete row" button if there are fewer than two rows
+ checkLastRow();
+
});
//]]>
</script>
diff --git a/src/usr/local/www/widgets/widgets/wake_on_lan.widget.php b/src/usr/local/www/widgets/widgets/wake_on_lan.widget.php
index 94698f3..60d6eaf 100644
--- a/src/usr/local/www/widgets/widgets/wake_on_lan.widget.php
+++ b/src/usr/local/www/widgets/widgets/wake_on_lan.widget.php
@@ -88,17 +88,17 @@ if (count($wolcomputers) > 0) {
$status = exec("/usr/sbin/arp -an | /usr/bin/awk '$4 == \"{$wolent['mac']}\" { print $7 }'");
if ($status == 'expires') {
echo '<td class="listr" align="center">' . "\n";
- echo "<i class="icon-large icon-arrow-right"></i> " . gettext("Online") . "</td>\n";
+ echo '<i class="icon-large icon-arrow-right"></i> ' . gettext("Online") . "</td>\n";
} else if ($status == 'permanent') {
echo '<td class="listr" align="center">' . "\n";
- echo "<i class="icon-large icon-arrow-right"></i> " . gettext("Static ARP") . "</td>\n";
+ echo '<i class="icon-large icon-arrow-right"></i> ' . gettext("Static ARP") . "</td>\n";
} else {
echo '<td class="listbg" align="center">' . "\n";
- echo "<i class="icon-large icon-ban-circle"></i>&nbsp;<font color=\"white\">" . gettext("Offline") . "</font></td>\n";
+ echo '<i class="icon-large icon-ban-circle"></i>&nbsp;<font color="white">' . gettext("Offline") . "</font></td>\n";
}
echo '<td valign="middle" class="list nowrap">';
echo "<a href='services_wol.php?mac={$wolent['mac']}&amp;if={$wolent['interface']}'> ";
- echo "<i class="icon-large icon-thumbs-up" alt="wol"></i></a>\n";
+ echo '<i class="icon-large icon-thumbs-up" alt="wol"></i></a>' . "\n";
echo "</td></tr>\n";
}
} else {
OpenPOWER on IntegriCloud