]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/commitdiff
cgi-bin: Remove font tags with no effect, and style tags
authorAlf Høgemark <alf@i100.no>
Sat, 22 Feb 2014 10:59:55 +0000 (11:59 +0100)
committerAlf Høgemark <alf@i100.no>
Sat, 22 Feb 2014 11:13:02 +0000 (12:13 +0100)
The font tag is deprecated, so clean up html by removing
font tags that have no effect.

For font tags that have an effect, move the styling to
the tag controlling the text output.

The aim is to get one step further towards validating html.

html/cgi-bin/dnsforward.cgi
html/cgi-bin/media.cgi
html/cgi-bin/upnp.cgi

index 5f051d21f0843512b0caf285251ba0fe746d209f..b66fa467b25b6f6bf402c4feb112ef85ec676030 100644 (file)
@@ -207,20 +207,20 @@ if ($cgiparams{'ACTION'} eq $Lang::tr{'edit'}) {
 print <<END
 <table width='100%'>
        <tr>
-               <td width='20%' class='base'><font>$Lang::tr{'dnsforward zone'}:</font></td>
+               <td width='20%' class='base'>$Lang::tr{'dnsforward zone'}:</td>
                <td><input type='text' name='ZONE' value='$cgiparams{'ZONE'}' size='24' /></td>
                <td width='30%' class='base'>$Lang::tr{'enabled'}<input type='checkbox' name='ENABLED' $checked{'ENABLED'}{'on'} /></td>
        </tr>
 
        <tr>
-               <td width='20%' class='base'><font>$Lang::tr{'dnsforward forward_server'}:</font></td>
+               <td width='20%' class='base'>$Lang::tr{'dnsforward forward_server'}:</td>
                <td><input type='text' name='FORWARD_SERVER' value='$cgiparams{'FORWARD_SERVER'}' size='24' /></td>
        </tr>
 </table>
 
 <table width='100%'>
        <tr>
-               <td width ='20%' class='base'><font class='boldbase'>$Lang::tr{'remark'}:</font>&nbsp;<img src='/blob.gif' alt='*' /></td>
+               <td width ='20%' class='base'>$Lang::tr{'remark'}:&nbsp;<img src='/blob.gif' alt='*' /></td>
                <td><input type='text' name='REMARK' value='$cgiparams{'REMARK'}' size='40' maxlength='50' /></td>
        </tr>
 </table>
@@ -229,7 +229,7 @@ print <<END
 
 <table width='100%'>
        <tr>
-               <td class='base' width='55%'><img src='/blob.gif' alt ='*' align='top' />&nbsp;<font class='base'>$Lang::tr{'this field may be blank'}</font></td>
+               <td class='base' width='55%'><img src='/blob.gif' alt ='*' align='top' />&nbsp;$Lang::tr{'this field may be blank'}</td>
                <td width='40%' align='right'>
                        <input type='hidden' name='ACTION' value='$Lang::tr{'add'}' />
                        <input type='submit' name='SUBMIT' value='$buttontext' />
index 7e8e32eeae848a96e0def3f7b00159287c8fda69..2aec3cce1d5a5d81c04cf3c8e7a66de6119f2fe6 100644 (file)
@@ -206,9 +206,9 @@ sub diskbox {
 
                if ( $status[1]=~/standby/){
                        my $ftime = localtime((stat("/var/run/hddshutdown-$disk"))[9]);
-                       print"<b>Disk $disk status:<font color='#FF0000'>".$status[1]."</font></b> ($Lang::tr{'since'} $ftime)";
+                       print"<b>Disk $disk status:<span style='color:#FF0000'>".$status[1]."</b> ($Lang::tr{'since'} $ftime)";
                }else{
-                       print"<b>Disk $disk status:<font color='#00FF00'>".$status[1]."</font></b>";
+                       print"<b>Disk $disk status:<span style='color:#00FF00'>".$status[1]."</b>";
                }
        }
 
index ee341e15ae7212bec5207ade6955adcd7d8fe0c8..07dfa2677c970e49a9be6ae9ffe5f209fb26616c 100644 (file)
@@ -133,7 +133,7 @@ print <<END
 <table width='95%' cellspacing='0'>
 END
 ;
-if ( $message ne "" ) {print "<tr><td colspan='3' align='center'><font color='red'>$message</font>";}
+if ( $message ne "" ) {print "<tr><td colspan='3' style='text-align:center; color:red;'>$message</td></tr>";}
 
 my $lines = 0;
 my $key = '';
@@ -199,9 +199,9 @@ print "</table>";
 ############################################################################################################################
 
 sub isrunning
-       {
+{
        my $cmd = $_[0];
-       my $status = "<td bgcolor='${Header::colourred}' align='center'><font color='white'><b>$Lang::tr{'stopped'}</b></font></td>";
+       my $status = "<td bgcolor='${Header::colourred}' style='text-align:center; color:white;'><b>$Lang::tr{'stopped'}</b></td>";
        my $pid = '';
        my $testcmd = '';
        my $exename;
@@ -219,9 +219,10 @@ sub isrunning
                                {if (/^Name:\W+(.*)/) {$testcmd = $1; }}
                        close FILE;
                        if ($testcmd =~ /$exename/)
-                               {$status = "<td bgcolor='${Header::colourgreen}'><font color='white'><b>$Lang::tr{'running'}</b></font></td>";}
+                               {$status = "<td style='color:white; background-color:${Header::colourgreen};'><b>$Lang::tr{'running'}</b></td>";}
                        }
                }
 
                return $status;
-       }
+}
+