dhcp.cgi: Bug 10400 - Add Additional DHCP Options - change default

Message ID 20210519145213.3625-1-adolf.belka@ipfire.org
State Accepted
Commit 6fcd779c053d9156b2a744da6090469188e36950
Headers
Series dhcp.cgi: Bug 10400 - Add Additional DHCP Options - change default |

Commit Message

Adolf Belka May 19, 2021, 2:52 p.m. UTC
  - Make the default that Additional DHCP options Enabled checkbox is
   checked when entering a new option.
- For existing options the Enabled checkbox status is honoured.

Fixes: #10400
Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
---
 html/cgi-bin/dhcp.cgi | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
  

Patch

diff --git a/html/cgi-bin/dhcp.cgi b/html/cgi-bin/dhcp.cgi
index dd379dc47..388c4d240 100644
--- a/html/cgi-bin/dhcp.cgi
+++ b/html/cgi-bin/dhcp.cgi
@@ -535,7 +535,8 @@  if ($dhcpsettings{'ACTION'} eq '' ) { # First launch from GUI
 	}
     }
     $dhcpsettings{'FIX_ENABLED'} = 'on';
-}
+    $dhcpsettings{'ADVOPT_ENABLED'} = 'on';
+    }
 
 &Header::openpage($Lang::tr{'dhcp configuration'}, 1, '');
 &Header::openbigbox('100%', 'left', '', $errormessage);