From e9c3be35d64476dcaa0785b58b1c8c9723d5f231 Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Sun, 25 Mar 2018 13:10:27 +0000 Subject: [PATCH] www: visual cleanups, unused class/style zapping #2290 --- src/www/diag_logs_settings.php | 302 ++++---- src/www/diag_resetstate.php | 11 +- src/www/diag_sockets.php | 2 - src/www/firewall_nat_1to1.php | 2 +- src/www/firewall_nat_1to1_edit.php | 10 +- src/www/firewall_rules.php | 12 +- src/www/firewall_rules_edit.php | 4 +- src/www/firewall_schedule_edit.php | 8 +- src/www/firewall_scrub_edit.php | 4 +- src/www/interfaces_bridge_edit.php | 2 +- src/www/interfaces_gre_edit.php | 2 +- src/www/interfaces_lagg_edit.php | 2 +- src/www/interfaces_ppps_edit.php | 2 +- src/www/interfaces_vlan_edit.php | 2 +- src/www/services_dhcp.php | 5 +- src/www/services_dhcp_edit.php | 2 +- src/www/services_dhcp_relay.php | 2 +- src/www/services_dhcpv6_edit.php | 2 +- src/www/services_dhcpv6_relay.php | 2 +- src/www/services_dnsmasq.php | 8 +- src/www/services_ntpd.php | 2 +- src/www/system_advanced_admin.php | 680 +++++++++--------- src/www/system_advanced_firewall.php | 83 +-- src/www/system_advanced_misc.php | 10 +- src/www/system_advanced_notifications.php | 72 +- src/www/system_advanced_sysctl.php | 2 +- src/www/system_general.php | 28 +- src/www/vpn_ipsec_phase1.php | 2 +- src/www/vpn_openvpn_client.php | 8 +- src/www/vpn_openvpn_csc.php | 2 +- src/www/vpn_openvpn_export.php | 28 +- src/www/vpn_openvpn_server.php | 9 +- src/www/widgets/widgets/ipsec.widget.php | 16 +- src/www/widgets/widgets/ntp_status.widget.php | 16 +- src/www/wizard.php | 44 +- 35 files changed, 688 insertions(+), 700 deletions(-) diff --git a/src/www/diag_logs_settings.php b/src/www/diag_logs_settings.php index 9dbbf1b43..bf03de032 100644 --- a/src/www/diag_logs_settings.php +++ b/src/www/diag_logs_settings.php @@ -115,7 +115,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { $pconfig['logbogons'] = empty($config['syslog']['nologbogons']); $pconfig['logprivatenets'] = empty($config['syslog']['nologprivatenets']); $pconfig['loglighttpd'] = empty($config['syslog']['nologlighttpd']); - $pconfig['filterdescriptions'] = !empty($config['syslog']['filterdescriptions']) ? $config['syslog']['filterdescriptions'] : null; $pconfig['disablelocallogging'] = isset($config['syslog']['disablelocallogging']); $pconfig['logfilesize'] = !empty($config['syslog']['logfilesize']) ? $config['syslog']['logfilesize'] : null; } elseif ($_SERVER['REQUEST_METHOD'] === 'POST') { @@ -183,11 +182,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { $config['syslog']['nologbogons'] = empty($pconfig['logbogons']); $config['syslog']['nologprivatenets'] = empty($pconfig['logprivatenets']); $config['syslog']['nologlighttpd'] = empty($pconfig['loglighttpd']); - if (is_numeric($pconfig['filterdescriptions']) && $pconfig['filterdescriptions'] > 0) - $config['syslog']['filterdescriptions'] = $pconfig['filterdescriptions']; - elseif (isset($config['syslog']['filterdescriptions'])) { - unset($config['syslog']['filterdescriptions']); - } write_config(); @@ -380,176 +374,178 @@ $(document).ready(function() { /> -
+ + + + + + /> -
+ + + + + + /> -
+ + + + + + /> -
+ /> -
+ - - - - - - - - - onclick="enable_change(false)" /> - - - - - - "/> - - - - - + + onclick="enable_change(false)" /> + + + + + + "/> + + + + - -
-
- - - - - - - - + + + + + + + + + + + + + + + + + + + + +
- - -
- + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - -
+ - -
- - -
- onclick="enable_change(false)" /> - -
- - - - - - - - - - - - - -
- -
- onclick="check_everything();" /> -

- /> -
- /> -
- /> -
- /> -
- /> -
- /> -
- /> -
- /> -
- /> -
- /> -
-
" onclick="enable_change(true)" /> -
- -
- + endforeach; ?> + + +
+ + +
+ onclick="enable_change(false)" /> + +
+ + + + + + + + + + + + + +
+ +
+ onclick="check_everything();" /> +

+ /> +
+ /> +
+ /> +
+ /> +
+ /> +
+ /> +
+ /> +
+ /> +
+ /> +
+ /> +
+
+ +
+
+
+
+
+ + + + + +
" onclick="enable_change(true)" /> +
+
diff --git a/src/www/diag_resetstate.php b/src/www/diag_resetstate.php index d065b135c..6bfe724b4 100644 --- a/src/www/diag_resetstate.php +++ b/src/www/diag_resetstate.php @@ -65,8 +65,7 @@ include("head.inc");

-
-
+

-
-
+


-
-

+ "will be cleared for all clients."); ?>

+

diff --git a/src/www/diag_sockets.php b/src/www/diag_sockets.php index 4b588d34b..7eca43d0f 100644 --- a/src/www/diag_sockets.php +++ b/src/www/diag_sockets.php @@ -84,8 +84,6 @@ $showAllOption = $showAll ? "" : "?showAll"; } else { print("$entry\n"); } - if ($i > 0) - $class = 'listr'; $j++; } print("\n"); diff --git a/src/www/firewall_nat_1to1.php b/src/www/firewall_nat_1to1.php index a5d5d5f05..1235384d8 100644 --- a/src/www/firewall_nat_1to1.php +++ b/src/www/firewall_nat_1to1.php @@ -209,7 +209,7 @@ $main_buttons = array( $i = 0; foreach ($a_1to1 as $natent): ?> - style="vertical-align:top" ondblclick="document.location='firewall_nat_1to1_edit.php?id=';"> + ondblclick="document.location='firewall_nat_1to1_edit.php?id=';"> diff --git a/src/www/firewall_nat_1to1_edit.php b/src/www/firewall_nat_1to1_edit.php index 7b939a013..d22e6c5b7 100644 --- a/src/www/firewall_nat_1to1_edit.php +++ b/src/www/firewall_nat_1to1_edit.php @@ -239,10 +239,10 @@ include("head.inc");
- - + @@ -338,7 +338,7 @@ include("head.inc"); + @@ -349,7 +349,7 @@ $( document ).ready(function() { || ((count($config['interfaces']) == 1) && ($selected_if == 'wan')))): $alports = implode('
', filter_core_antilockout_ports()); ?> - + @@ -386,14 +386,14 @@ $( document ).ready(function() { - - + -
+ - +
- + "/>
- + " aria-label=""/>
  IPv6 *
  * - " class="btn btn-default btn-xs"> + + " class="btn btn-default btn-xs">
  @@ -658,7 +658,7 @@ $( document ).ready(function() { if (!$interface_has_rules): ?>
+ - - + diff --git a/src/www/firewall_schedule_edit.php b/src/www/firewall_schedule_edit.php index 46c646013..14dc5c557 100644 --- a/src/www/firewall_schedule_edit.php +++ b/src/www/firewall_schedule_edit.php @@ -622,7 +622,7 @@ function insertElements(tempFriendlyTime, starttimehour, starttimemin, stoptimeh tbody = d.getElementById("scheduletable").getElementsByTagName("tbody").item(0); tr = d.createElement("tr"); td = d.createElement("td"); - td.innerHTML= "" + tempFriendlyTime + "<\/span>"; + td.innerHTML= "" + tempFriendlyTime + "<\/span>"; tr.appendChild(td); td = d.createElement("td"); @@ -876,20 +876,20 @@ function removeRow(el) { echo ""; } if ($firstdayofmonth == $positioncounter){?> - "; + echo ""; } if ($positioncounter == 7 || $daycounter > $numberofdays) { diff --git a/src/www/firewall_scrub_edit.php b/src/www/firewall_scrub_edit.php index 54dcd7489..7530cabe5 100644 --- a/src/www/firewall_scrub_edit.php +++ b/src/www/firewall_scrub_edit.php @@ -289,8 +289,8 @@ include("head.inc");
+
+ "; } elseif ($firstdayprinted == TRUE && $daycounter <= $numberofdays){?> - + "; } else { - echo "
- - + diff --git a/src/www/interfaces_bridge_edit.php b/src/www/interfaces_bridge_edit.php index 85385f5ed..8f62396da 100644 --- a/src/www/interfaces_bridge_edit.php +++ b/src/www/interfaces_bridge_edit.php @@ -617,7 +617,7 @@ $(document).ready(function() {
+
- + - + - +
   " /> diff --git a/src/www/interfaces_gre_edit.php b/src/www/interfaces_gre_edit.php index e5014734f..74cdc9886 100644 --- a/src/www/interfaces_gre_edit.php +++ b/src/www/interfaces_gre_edit.php @@ -253,7 +253,7 @@ include("head.inc");
   " /> diff --git a/src/www/interfaces_lagg_edit.php b/src/www/interfaces_lagg_edit.php index b2908f7e8..f1b960d74 100644 --- a/src/www/interfaces_lagg_edit.php +++ b/src/www/interfaces_lagg_edit.php @@ -294,7 +294,7 @@ legacy_html_escape_form_data($pconfig);
   " /> diff --git a/src/www/interfaces_ppps_edit.php b/src/www/interfaces_ppps_edit.php index 888a26d6d..c16690634 100644 --- a/src/www/interfaces_ppps_edit.php +++ b/src/www/interfaces_ppps_edit.php @@ -807,7 +807,7 @@ include("head.inc"); - + - +
   " /> " onclick="window.location.href='/interfaces_ppps.php'" /> diff --git a/src/www/interfaces_vlan_edit.php b/src/www/interfaces_vlan_edit.php index 5fd6bacb7..e29b1dd27 100644 --- a/src/www/interfaces_vlan_edit.php +++ b/src/www/interfaces_vlan_edit.php @@ -220,7 +220,7 @@ include("head.inc");
   " /> diff --git a/src/www/services_dhcp.php b/src/www/services_dhcp.php index e713558a2..d7663e22a 100644 --- a/src/www/services_dhcp.php +++ b/src/www/services_dhcp.php @@ -629,7 +629,7 @@ include("head.inc");
- +
@@ -1089,8 +1089,7 @@ include("head.inc");
- - + diff --git a/src/www/services_dhcp_edit.php b/src/www/services_dhcp_edit.php index b07210a93..7548567c2 100644 --- a/src/www/services_dhcp_edit.php +++ b/src/www/services_dhcp_edit.php @@ -325,7 +325,7 @@ include("head.inc");
 
- +
diff --git a/src/www/services_dhcp_relay.php b/src/www/services_dhcp_relay.php index 88c1991aa..01fcbf636 100644 --- a/src/www/services_dhcp_relay.php +++ b/src/www/services_dhcp_relay.php @@ -117,7 +117,7 @@ include("head.inc");
- +
diff --git a/src/www/services_dhcpv6_edit.php b/src/www/services_dhcpv6_edit.php index 8161661f7..0096ce051 100644 --- a/src/www/services_dhcpv6_edit.php +++ b/src/www/services_dhcpv6_edit.php @@ -155,7 +155,7 @@ include("head.inc");
- +
diff --git a/src/www/services_dhcpv6_relay.php b/src/www/services_dhcpv6_relay.php index d5aa9cf27..88991bb1c 100644 --- a/src/www/services_dhcpv6_relay.php +++ b/src/www/services_dhcpv6_relay.php @@ -117,7 +117,7 @@ include("head.inc");
- +
diff --git a/src/www/services_dnsmasq.php b/src/www/services_dnsmasq.php index 8695f5e9c..2f7bc4c9b 100644 --- a/src/www/services_dnsmasq.php +++ b/src/www/services_dnsmasq.php @@ -230,10 +230,10 @@ $( document ).ready(function() {
- - + diff --git a/src/www/services_ntpd.php b/src/www/services_ntpd.php index de32bba76..27dde2c38 100644 --- a/src/www/services_ntpd.php +++ b/src/www/services_ntpd.php @@ -416,7 +416,7 @@ include("head.inc"); - + diff --git a/src/www/system_advanced_admin.php b/src/www/system_advanced_admin.php index b2ce676c3..1f8e92f78 100644 --- a/src/www/system_advanced_admin.php +++ b/src/www/system_advanced_admin.php @@ -380,8 +380,8 @@ $(document).ready(function() { } ?>
-
- + +
- - + + +
   " />
@@ -390,350 +390,364 @@ $(document).ready(function() { - - - + + - - - - + + + + + + + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + endforeach;?> + + + + + + + +
- /> - -     - /> - +
+ /> + +     + /> + -
- ','') ?> + if (!$certs_available) :?> +
+ ','') ?> -
-
+ + +
+ -
+ + +
+ /> + + +
+ /> + + +
+ /> + + +
+ + + +
+ + +
+ /> + + +
- $cipher_data):?> - + foreach ($interfaces as $iface => $ifacename): ?> + - - -
- - -
- /> - - -
- /> - - -
- /> - - -
- - - -
- - -
- /> - - -
- - -
- /> - - -
- /> - -
- - -
- /> - - -
- /> - - -
- - -
- - -
- /> - -
- - -
- - -
- - -
- /> - -
- /> - - -
- -
 " />
+ /> + + +
- -
- - + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ /> + +
+ + +
+ /> + + +
+ /> + + +
+ + +
+ + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ /> + +
+ + +
+ + +
+ + +
+ /> + +
+ /> + + +
+ +
+
+
+ + + + + +
" />
+
+ + + diff --git a/src/www/system_advanced_firewall.php b/src/www/system_advanced_firewall.php index fc7c6d697..de2e59bb7 100644 --- a/src/www/system_advanced_firewall.php +++ b/src/www/system_advanced_firewall.php @@ -252,7 +252,7 @@ include("head.inc");
- + @@ -584,8 +580,7 @@ include("head.inc"); @@ -595,8 +590,7 @@ include("head.inc"); @@ -606,8 +600,7 @@ include("head.inc");
@@ -262,7 +262,7 @@ include("head.inc"); onclick="enable_change(false)" /> - +
/> - + /> - + /> - + /> - + diff --git a/src/www/system_advanced_misc.php b/src/www/system_advanced_misc.php index f76f7a695..26cdb1187 100644 --- a/src/www/system_advanced_misc.php +++ b/src/www/system_advanced_misc.php @@ -225,7 +225,7 @@ include("head.inc");
- + - + - + - + - + - + - + - + - + - + @@ -1561,7 +1561,7 @@ if (isset($savemsg)) { - + - @@ -926,9 +926,6 @@ endif; ?> - - - @@ -1538,7 +1535,7 @@ endif; ?>
@@ -277,7 +277,7 @@ include("head.inc");
- + @@ -308,7 +308,7 @@ include("head.inc");
- + @@ -389,7 +389,7 @@ include("head.inc");
- + @@ -477,7 +477,7 @@ include("head.inc");
- + diff --git a/src/www/system_advanced_notifications.php b/src/www/system_advanced_notifications.php index 3b2847a58..3ee9654c9 100644 --- a/src/www/system_advanced_notifications.php +++ b/src/www/system_advanced_notifications.php @@ -150,9 +150,9 @@ include("head.inc"); } ?> -
-
-
+
+ +
@@ -182,7 +182,7 @@ include("head.inc"); +
- ' />
+ ' /> @@ -191,7 +191,7 @@ include("head.inc");
-
+ @@ -200,14 +200,19 @@ include("head.inc");
-
+
+
+
+ - + + @@ -240,9 +245,9 @@ include("head.inc"); @@ -268,7 +273,6 @@ include("head.inc"); @@ -276,52 +280,48 @@ include("head.inc"); +
/> -
+
/> -
+
- ' />
+ ' />
+
+
+ - - - - - + + +
 
/> - -
+
+
+
+ - - - - - + - - - -
 
+ " /> -
- " class="btn btn-primary" /> - " class="btn btn-primary" /> -
- + " class="btn btn-default" /> + " class="btn btn-default" />
+
+ +
- -
+ + diff --git a/src/www/system_advanced_sysctl.php b/src/www/system_advanced_sysctl.php index 54972a2f1..3c049dfdf 100644 --- a/src/www/system_advanced_sysctl.php +++ b/src/www/system_advanced_sysctl.php @@ -202,7 +202,7 @@ $( document ).ready(function() { - + diff --git a/src/www/system_general.php b/src/www/system_general.php index 9accb1c68..206d305c5 100644 --- a/src/www/system_general.php +++ b/src/www/system_general.php @@ -242,7 +242,7 @@ include("head.inc");
- + @@ -320,9 +318,7 @@ include("head.inc"); endforeach; ?> @@ -331,14 +327,14 @@ include("head.inc");
@@ -300,9 +300,7 @@ include("head.inc"); endforeach;?>
- + + + + + - + @@ -709,14 +709,14 @@ $( document ).ready(function() {
/> - + /> - - - + -
+
/> - - - +
/>

/> - +
/> - + @@ -1110,7 +1110,7 @@ $( document ).ready(function() {
-
+ diff --git a/src/www/vpn_openvpn_csc.php b/src/www/vpn_openvpn_csc.php index 69486bd45..27b657ab3 100644 --- a/src/www/vpn_openvpn_csc.php +++ b/src/www/vpn_openvpn_csc.php @@ -670,7 +670,7 @@ if ($act!="new" && $act!="edit") {
   " /> diff --git a/src/www/vpn_openvpn_export.php b/src/www/vpn_openvpn_export.php index e2b34158d..8d11f654b 100644 --- a/src/www/vpn_openvpn_export.php +++ b/src/www/vpn_openvpn_export.php @@ -1278,7 +1278,7 @@ if (isset($savemsg)) {
@@ -1371,7 +1371,7 @@ if (isset($savemsg)) {
-
- + +
-
-
diff --git a/src/www/vpn_openvpn_server.php b/src/www/vpn_openvpn_server.php index 9bee6b441..69ab9afba 100644 --- a/src/www/vpn_openvpn_server.php +++ b/src/www/vpn_openvpn_server.php @@ -610,7 +610,7 @@ $( document ).ready(function() {
+ @@ -773,7 +773,7 @@ $( document ).ready(function() { -
+
-
+ diff --git a/src/www/widgets/widgets/ipsec.widget.php b/src/www/widgets/widgets/ipsec.widget.php index 3771d6ea5..e98d7b322 100644 --- a/src/www/widgets/widgets/ipsec.widget.php +++ b/src/www/widgets/widgets/ipsec.widget.php @@ -210,15 +210,13 @@ else { + + +
+
+
+ ', ''); ?> +
- - - -
-
-
- ', ''); ?> -
-
diff --git a/src/www/widgets/widgets/ntp_status.widget.php b/src/www/widgets/widgets/ntp_status.widget.php index 4ec51be69..0b1b96a0d 100644 --- a/src/www/widgets/widgets/ntp_status.widget.php +++ b/src/www/widgets/widgets/ntp_status.widget.php @@ -126,8 +126,8 @@ if ($_REQUEST['updateme']) { - - + - - + - - + - - + \n"; } else if(!$field['dontdisplayname']) { - echo "\n"; } @@ -477,18 +477,18 @@ function showchange() { } break; case "text": - echo "\n"; } else if(!$field['dontdisplayname']) { - echo "\n"; } @@ -511,7 +511,7 @@ function showchange() { $size = ""; $multiple = ""; $name = strtolower($name); - echo ""; echo "\n"; } else if(!$field['dontdisplayname']) { - echo "\n"; } @@ -578,7 +578,7 @@ function showchange() { $size = ""; $multiple = ""; $name = strtolower($name); - echo ""; echo ""; echo "\n"; } else if(!$field['dontdisplayname']) { - echo "\n"; } @@ -697,11 +697,11 @@ function showchange() { break; case "textarea": if ($field['displayname']) { - echo "\n"; } else if(!$field['dontdisplayname']) { - echo ""; } @@ -735,11 +735,11 @@ function showchange() { break; case "subnet_select": if ($field['displayname']) { - echo "\n"; } else if(!$field['dontdisplayname']) { - echo ""; } @@ -771,11 +771,11 @@ function showchange() { $languagelist = get_locale_list(); if ($field['displayname']) { - echo "\n"; } else if(!$field['dontdisplayname']) { - echo ""; } @@ -800,11 +800,11 @@ function showchange() { $timezonelist = get_zoneinfo(); if ($field['displayname']) { - echo "\n"; } else if(!$field['dontdisplayname']) { - echo ""; } @@ -829,11 +829,11 @@ function showchange() { break; case "checkbox": if ($field['displayname']) { - echo "\n"; } else if(!$field['dontdisplayname']) { - echo ""; }
Sync Source + Sync Source @@ -142,8 +142,8 @@ endif; ?>
+ @@ -156,8 +156,8 @@ endif; ?>
+
Server Time + Server Time
diff --git a/src/www/wizard.php b/src/www/wizard.php index 6f62c12d2..9bc51d022 100644 --- a/src/www/wizard.php +++ b/src/www/wizard.php @@ -454,11 +454,11 @@ function showchange() { switch ($field['type']) { case "input": if ($field['displayname']) { - echo "
\n"; + echo "\n"; echo gettext($field['displayname']); echo ":\n"; + echo "\n"; echo gettext($field['name']); echo ":\n"; + echo "\n"; if($field['description'] <> "") { echo "

" . gettext($field['description']) . "
"; } break; case "inputalias": if ($field['displayname']) { - echo "
\n"; + echo "\n"; echo gettext($field['displayname']); echo ":\n"; + echo "\n"; echo gettext($field['name']); echo ":\n"; + echo "\n"; echo ($field['displayname'] ? gettext($field['displayname']) : gettext($field['name'])) . ":\n"; echo "\n"; @@ -554,11 +554,11 @@ function showchange() { break; case "password": if ($field['displayname']) { - echo "\n"; + echo "\n"; echo gettext($field['displayname']); echo ":\n"; + echo "\n"; echo gettext($field['name']); echo ":\n"; + echo "\n"; echo ($field['displayname'] ? gettext($field['displayname']) : gettext($field['name'])) . ":\n"; echo "\n"; @@ -619,7 +619,7 @@ function showchange() { $size = ""; $multiple = ""; $name = strtolower($name); - echo "\n"; + echo "\n"; echo ($field['displayname'] ? gettext($field['displayname']) : gettext($field['name'])) . ":\n"; echo "\n"; @@ -657,11 +657,11 @@ function showchange() { break; case "select": if ($field['displayname']) { - echo "\n"; + echo "\n"; echo gettext($field['displayname']); echo ":\n"; + echo "\n"; echo gettext($field['name']); echo ":\n"; + echo "\n"; echo gettext($field['displayname']); echo ":\n"; + echo "\n"; echo gettext($field['name']); echo ":\n"; + echo "\n"; echo gettext($field['displayname']); echo ":\n"; + echo "\n"; echo gettext($field['name']); echo ":\n"; + echo "\n"; echo gettext($field['displayname']); echo ":\n"; + echo "\n"; echo gettext($field['name']); echo ":\n"; + echo "\n"; echo gettext($field['displayname']); echo ":\n"; + echo "\n"; echo gettext($field['name']); echo ":\n"; + echo "\n"; echo gettext($field['displayname']); echo ":\n"; + echo "\n"; echo gettext($field['name']); echo ":