From: <eob...@us...> - 2009-03-29 11:30:24
|
Revision: 2656 http://ipcop.svn.sourceforge.net/ipcop/?rev=2656&view=rev Author: eoberlander Date: 2009-03-29 11:30:13 +0000 (Sun, 29 Mar 2009) Log Message: ----------- Fix variable names to allow test for warning message to work. Add warning message box. Modified Paths: -------------- ipcop/trunk/html/cgi-bin/dhcp.cgi Modified: ipcop/trunk/html/cgi-bin/dhcp.cgi =================================================================== --- ipcop/trunk/html/cgi-bin/dhcp.cgi 2009-03-29 11:17:49 UTC (rev 2655) +++ ipcop/trunk/html/cgi-bin/dhcp.cgi 2009-03-29 11:30:13 UTC (rev 2656) @@ -46,7 +46,6 @@ my $error_save_main = ''; my $error_save_fixed = ''; my $warnmessage = ''; -my $warnNTPmessage = ''; # owes: TODO add Blue only when defined my @INTERFACEs = ('GREEN', 'BLUE'); @@ -242,10 +241,10 @@ $errormessage = "DHCP on ${interface}: " . $Lang::tr{'invalid primary ntp'}; goto ERROR_SAVE_MAIN; } - if ( ($dhcpsettings{"NTP1_${interface}_${counter}"} eq $netsettings{"${interface}_ADDRESS"}) - && ($timesettings{'ENABLENTP'} ne 'on')) + if ( ($dhcpsettings{"NTP1_${interface}_${counter}"} eq $netsettings{"${interface}_${counter}_ADDRESS"}) + && ($timesettings{'ENABLED_NTP'} ne 'on')) { - $warnNTPmessage = + $warnmessage = "DHCP on ${interface}: " . $Lang::tr{'local ntp server specified but not enabled'}; } } @@ -254,10 +253,10 @@ $errormessage = "DHCP on ${interface}: " . $Lang::tr{'invalid secondary ntp'}; goto ERROR_SAVE_MAIN; } - if ( ($dhcpsettings{"NTP2_${interface}_${counter}"} eq $netsettings{"${interface}_ADDRESS"}) - && ($timesettings{'ENABLENTP'} ne 'on')) + if ( ($dhcpsettings{"NTP2_${interface}_${counter}"} eq $netsettings{"${interface}_${counter}_ADDRESS"}) + && ($timesettings{'ENABLED_NTP'} ne 'on')) { - $warnNTPmessage = + $warnmessage = "DHCP on ${interface}: " . $Lang::tr{'local ntp server specified but not enabled'}; } if (!$dhcpsettings{"NTP1_${interface}_${counter}"}) { @@ -391,6 +390,15 @@ } # +# display box with warnmessage in case of warning +# +if ($warnmessage) { + &Header::openbox('100%', 'left', $Lang::tr{'capswarning'}, 'warning'); + print "<font class='base'>$warnmessage </font>\n"; + &Header::closebox(); +} + +# # display box with errormessage in case of error # if ($errormessage) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |