dyndns widget - fix cached IP status colors to standard values (#1139)

the ip color of the dyndns widget is now automatically adjusted for each theme. (text-success or text-warning). This results in a nicer overall picture and does not use another color value for green or red.
This commit is contained in:
René
2019-02-01 08:07:10 +01:00
committed by Franco Fichtner
parent c3d2972772
commit cc6e6ddec0
2 changed files with 5 additions and 4 deletions
+1
View File
@@ -1,5 +1,6 @@
PLUGIN_NAME= dyndns
PLUGIN_VERSION= 1.12
PLUGIN_REVISION= 1
PLUGIN_COMMENT= Dynamic DNS Support
PLUGIN_MAINTAINER= franco@opnsense.org
@@ -64,16 +64,16 @@ if (!empty($_REQUEST['getdyndnsstatus'])) {
$cached_ip_s = explode('|', $fdata);
$cached_ip = $cached_ip_s[0];
echo sprintf(
'<font color="%s">%s</font>',
$ipaddr != $cached_ip ? 'red' : 'green',
'<span class="%s">%s</span>',
$ipaddr != $cached_ip ? 'text-warning' : 'text-success',
htmlspecialchars($cached_ip)
);
} elseif (!empty($fdata6)) {
$cached_ipv6_s = explode('|', $fdata6);
$cached_ipv6 = $cached_ipv6_s[0];
echo sprintf(
'<font color="%s">%s</font>',
$ipv6addr != $cached_ipv6 ? 'red' : 'green',
'<span class="%s">%s</span>',
$ipv6addr != $cached_ipv6 ? 'text-warning' : 'text-success',
htmlspecialchars($cached_ipv6)
);
} else {