]> git.ipfire.org Git - people/ms/ipfire-2.x.git/commitdiff
suricata: Fix broken spacing in the settings section
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 10 Sep 2024 09:01:52 +0000 (11:01 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 24 Sep 2024 08:43:06 +0000 (08:43 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
html/cgi-bin/ids.cgi

index 00cc502f1d7078bc2ac7a1996d0b102072a7c4cd..deebb3ad3a0f47b15b246dc40db166a92d53e6ab 100644 (file)
@@ -1017,30 +1017,29 @@ sub show_mainpage() {
 
        # Only show this area, if at least one ruleset provider is configured.
        if (%used_providers) {
+               my $num_zones = scalar @network_zones;
 
 print <<END
-
-               <br><br><h2>$Lang::tr{'settings'}</h2>
+               <br>
 
                <form method='post' action='$ENV{'SCRIPT_NAME'}'>
                        <table width='100%' border='0'>
                                <tr>
-                                       <td class='base' colspan='2'>
+                                       <td colspan='$num_zones'>
                                                <input type='checkbox' name='ENABLE_IDS' $checked{'ENABLE_IDS'}{'on'}>&nbsp;$Lang::tr{'ids enable'}
                                        </td>
-
-                               </td>
                                </tr>
 
-                               <tr>
-                                       <td><br><br></td>
-                                       <td><br><br></td>
-                                       <td><br><br></td>
-                                       <td><br><br></td>
+                               <tr> <!-- empty row for spacing -->
+                                       <td colspan='$num_zones'>
+                                               &nbsp;
+                                       </td>
                                </tr>
 
                                <tr>
-                                       <td colspan='4'><b>$Lang::tr{'ids monitored interfaces'}</b><br></td>
+                                       <td colspan='$num_zones'>
+                                               <b>$Lang::tr{'ids monitored interfaces'}</b>
+                                       </td>
                                </tr>
 
                                <tr>
@@ -1068,21 +1067,29 @@ END
                                $checked_input = "checked = 'checked'";
                        }
 
-                       print "<td class='base' width='20%'>\n";
-                       print "<input type='checkbox' name='ENABLE_IDS_$zone_upper' $checked_input>\n";
-                       print "&nbsp;$Lang::tr{'enabled on'}<font color='$colourhash{$zone}'> $Lang::tr{$zone_name}</font>\n";
-                       print "</td>\n";
+                       print <<END;
+                               <td>
+                                       <label>
+                                               <input type='checkbox' name='ENABLE_IDS_$zone_upper' $checked_input>
+                                               &nbsp; $Lang::tr{'enabled on'}<font color='$colourhash{$zone}'> $Lang::tr{$zone_name}</font>
+                                       </label>
+                               </td>
+END
                }
 
 print <<END
                                </tr>
-                       </table>
 
-                       <br><br>
+                               <tr> <!-- empty row for spacing -->
+                                       <td colspan='$num_zones'>
+                                               &nbsp;
+                                       </td>
+                               </tr>
 
-                       <table width='100%'>
                                <tr>
-                                       <td align='right'><input type='submit' name='IDS' value='$Lang::tr{'save'}' /></td>
+                                       <td colspan='$num_zones' align='right'>
+                                               <input type='submit' name='IDS' value='$Lang::tr{'save'}' />
+                                       </td>
                                </tr>
                        </table>
                </form>