From ca788a21126c8fcc87791632a115bfae8de06023 Mon Sep 17 00:00:00 2001
From: Gary Allan <github@gallan.co.uk>
Date: Fri, 29 Apr 2022 20:17:51 +0000
Subject: [PATCH] Bugfix: Fix ping & fping file exists hints for dark mode

---
 app/admin/settings/index.php       | 14 ++------------
 css/bootstrap/bootstrap-custom.css |  3 +++
 functions/version.php              |  2 +-
 3 files changed, 6 insertions(+), 13 deletions(-)

diff --git a/app/admin/settings/index.php b/app/admin/settings/index.php
index d29c52ec..7c8d95a1 100755
--- a/app/admin/settings/index.php
+++ b/app/admin/settings/index.php
@@ -580,12 +580,7 @@ $(document).ready(function() {
 <!-- Ping path -->
 <tr>
 	<td class="title"><?php print _('Ping path'); ?></td>
-	<?php
-	//verify that ping file exists!
-	if(!file_exists($settings['scanPingPath'])&&$settings['scanFPingType']=="ping")		{ $class="danger"; }
-	else																				{ $class=""; }
-	?>
-	<td class="<?php print $class; ?>">
+	<td class="<?php print !file_exists($settings['scanPingPath']) ? 'danger' : ''; ?>">
 		<input type="text" class="form-control input-sm" name="scanPingPath" value="<?php print $settings['scanPingPath']; ?>">
 	</td>
 	<td class="info2">
@@ -596,12 +591,7 @@ $(document).ready(function() {
 <!-- fping path -->
 <tr>
 	<td class="title"><?php print _('FPing path'); ?></td>
-	<?php
-	//verify that ping file exists!
-	if(!file_exists($settings['scanFPingPath'])&&$settings['scanFPingType']=="fping")	{ $class="danger"; }
-	else																				{ $class=""; }
-	?>
-	<td class="<?php print $class; ?>">
+	<td class="<?php print !file_exists($settings['scanFPingPath']) ? 'danger' : ''; ?>">
 		<input type="text" class="form-control input-sm" name="scanFPingPath" value="<?php print $settings['scanFPingPath']; ?>">
 	</td>
 	<td class="info2">
diff --git a/css/bootstrap/bootstrap-custom.css b/css/bootstrap/bootstrap-custom.css
index c0a8f2d7..0b7eed90 100644
--- a/css/bootstrap/bootstrap-custom.css
+++ b/css/bootstrap/bootstrap-custom.css
@@ -264,6 +264,9 @@ table#zonesPrint tr.border-top td,
 table#mappingsPrint tr.border-top td {
 	border-bottom: 1px solid #eee;
 }
+html table.table td.danger {
+	background-color: rgba(230, 25, 25, 0.5) !important;
+}
 
 
 
diff --git a/functions/version.php b/functions/version.php
index fbd40883..6a50285e 100644
--- a/functions/version.php
+++ b/functions/version.php
@@ -4,7 +4,7 @@ define("VERSION", "1.5");									//decimal release version e.g 1.32
 /* set latest version */
 define("VERSION_VISIBLE", "1.5.0");							//visible version in footer e.g 1.3.2
 /* set latest revision */
-define("REVISION", "015");									//increment on static content changes (js/css) or point releases to avoid caching issues
+define("REVISION", "016");									//increment on static content changes (js/css) or point releases to avoid caching issues
 /* set last possible upgrade */
 define("LAST_POSSIBLE", "1.19");							//minimum required version to be able to upgrade
 /* set published - hide dbversion in footer */
-- 
GitLab