From 73a9669840750f4a11fbb38e36485458f418e3b0 Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Wed, 15 Oct 2014 12:26:29 +0545 Subject: Provide an edit button for static mapped entries As suggested in forum https://forum.pfsense.org/index.php?topic=82883.msg0#new Instead of a non-functioning red plus icon, show an edit icon for static mapped entries, and take the user to services_dhcp_edit page if it is clicked. IMHO this makes it much easier to correct things that are noticed when viewing the Status, DHCP Leases display. --- usr/local/www/status_dhcp_leases.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'usr') diff --git a/usr/local/www/status_dhcp_leases.php b/usr/local/www/status_dhcp_leases.php index 1aeecd1..debca57 100644 --- a/usr/local/www/status_dhcp_leases.php +++ b/usr/local/www/status_dhcp_leases.php @@ -155,7 +155,7 @@ foreach($leases_content as $lease) { /* walk the fields */ $f = 0; $fcount = count($data); - /* with less then 20 fields there is nothing useful */ + /* with less than 20 fields there is nothing useful */ if($fcount < 20) { $i++; continue; @@ -351,11 +351,13 @@ foreach ($leases as $data) { if ($data['act'] == "static") { foreach ($config['dhcpd'] as $dhcpif => $dhcpifconf) { if(is_array($dhcpifconf['staticmap'])) { + $staticmap_array_index = 0; foreach ($dhcpifconf['staticmap'] as $staticent) { if ($data['ip'] == $staticent['ipaddr']) { $data['if'] = $dhcpif; break; } + $staticmap_array_index++; } } /* exit as soon as we have an interface */ @@ -404,7 +406,8 @@ foreach ($leases as $data) { echo ""; echo "\"add\" \n"; } else { - echo "\"add\" \n"; + echo ""; + echo "\"add\" \n"; } echo ""; -- cgit v1.1