]> git.ipfire.org Git - people/mfischer/ipfire-2.x.git/commitdiff
firewall.cgi: Fix colouring of the rule actions
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 7 Aug 2024 14:18:01 +0000 (16:18 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 7 Aug 2024 14:18:01 +0000 (16:18 +0200)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
html/cgi-bin/firewall.cgi
html/html/themes/ipfire/include/css/style.css

index b11381eeac789ea3450445ddeb4a47a443e1c125..240a959f314efd9b1c8a96a5f3676e97d8d58cb1 100644 (file)
@@ -1987,41 +1987,28 @@ END
                &Header::closebox;
                $checked{"RULE_ACTION"}{$fwdfwsettings{'RULE_ACTION'}}  = 'CHECKED';
                print <<END;
-                       <center>
-                               <table width="80%" class='tbl' id='actions'>
-                                       <tr>
-                                               <td width="33%" align="center" bgcolor="$color{'color17'}">
-                                                       &nbsp;<br>&nbsp;
-                                               </td>
-                                               <td width="33%" align="center" bgcolor="$color{'color25'}">
-                                                       &nbsp;<br>&nbsp;
-                                               </td>
-                                               <td width="33%" align="center" bgcolor="$color{'color16'}">
-                                                       &nbsp;<br>&nbsp;
-                                               </td>
-                                       </tr>
-                                       <tr>
-                                               <td width="33%" align="center">
-                                                       <label>
-                                                               <input type="radio" name="RULE_ACTION" value="ACCEPT" $checked{"RULE_ACTION"}{"ACCEPT"}>
-                                                               <strong>$Lang::tr{'fwdfw ACCEPT'}</strong>
-                                                       </label>
-                                               </td>
-                                               <td width="33%" align="center">
-                                                       <label>
-                                                               <input type="radio" name="RULE_ACTION" value="DROP" $checked{"RULE_ACTION"}{"DROP"}>
-                                                               <strong>$Lang::tr{'fwdfw DROP'}</strong>
-                                                       </label>
-                                               </td>
-                                               <td width="33%" align="center">
-                                                       <label>
-                                                               <input type="radio" name="RULE_ACTION" value="REJECT" $checked{"RULE_ACTION"}{"REJECT"}>
-                                                               <strong>$Lang::tr{'fwdfw REJECT'}</strong>
-                                                       </label>
-                                               </td>
-                                       </tr>
-                               </table>
-                       </center>
+                       <table class='tbl' id='actions'>
+                               <tr>
+                                       <td width="33%" class="policy is-allowed">
+                                               <label>
+                                                       <input type="radio" name="RULE_ACTION" value="ACCEPT" $checked{"RULE_ACTION"}{"ACCEPT"}>
+                                                       <strong>$Lang::tr{'fwdfw ACCEPT'}</strong>
+                                               </label>
+                                       </td>
+                                       <td width="33%" class="policy is-blocked">
+                                               <label>
+                                                       <input type="radio" name="RULE_ACTION" value="DROP" $checked{"RULE_ACTION"}{"DROP"}>
+                                                       <strong>$Lang::tr{'fwdfw DROP'}</strong>
+                                               </label>
+                                       </td>
+                                       <td width="33%" class="policy is-rejected">
+                                               <label>
+                                                       <input type="radio" name="RULE_ACTION" value="REJECT" $checked{"RULE_ACTION"}{"REJECT"}>
+                                                       <strong>$Lang::tr{'fwdfw REJECT'}</strong>
+                                               </label>
+                                       </td>
+                               </tr>
+                       </table>
 
                        <br>
 END
index 68fe167f35081c9c6f79f8d93d0343e9096304f4..c935f2ff4a4ea4d65db3c970beaf39ea2f1cc940 100644 (file)
@@ -7,6 +7,8 @@
        --color-blue-invert    : #ffffff;
        --color-orange         : #ff9933;
        --color-orange-invert  : #ffffff;
+       --color-black          : #000000;
+       --color-black-invert   : #ffffff;
        --color-grey           : #d6d6d6;
        --color-light-grey     : #f0f0f0;
 
@@ -458,11 +460,16 @@ table {
        color: var(--color-red-invert);
 }
 
-.tbl .policy.is-allowed{
+.tbl .policy.is-allowed {
        background-color: var(--color-green);
        color: var(--color-green-invert);
 }
 
+.tbl .policy.is-rejected {
+       background-color: var(--color-black);
+       color: var(--color-black-invert);
+}
+
 /* Notes */
 
 .notes .is-warning {