summaryrefslogtreecommitdiffstats
path: root/usr/local/www/firewall_schedule_edit.php
diff options
context:
space:
mode:
authorColin Fleming <cj_fleming@sky.com>2013-04-03 18:17:06 +0100
committerColin Fleming <cj_fleming@sky.com>2013-04-03 18:17:06 +0100
commit95f133d26953df3256509d2ae02be477a93de9c9 (patch)
tree8b595fbf887bcc0284fdbdfcbcc1693ab50b8784 /usr/local/www/firewall_schedule_edit.php
parentcd4a47d899d01a4037f0e0d0428a05a58e855409 (diff)
downloadpfsense-95f133d26953df3256509d2ae02be477a93de9c9.zip
pfsense-95f133d26953df3256509d2ae02be477a93de9c9.tar.gz
Tidy up "firewall_schedule_edit,php" XHTML
Add CDATA section to SCRIPT tags Close BR and INPUT tags Tidy up HTML tags to lower case Tidy up HTML boolean operators Spelling mistake
Diffstat (limited to 'usr/local/www/firewall_schedule_edit.php')
-rw-r--r--usr/local/www/firewall_schedule_edit.php90
1 files changed, 45 insertions, 45 deletions
diff --git a/usr/local/www/firewall_schedule_edit.php b/usr/local/www/firewall_schedule_edit.php
index a9d0b67..7e50f56 100644
--- a/usr/local/www/firewall_schedule_edit.php
+++ b/usr/local/www/firewall_schedule_edit.php
@@ -209,7 +209,7 @@ include("head.inc");
/* using some of the $pfSenseHead function calls */
$jscriptstr = <<<EOD
<script type="text/javascript">
-
+//<![CDATA[
var daysSelected = "";
var month_array = ['January','February','March','April','May','June','July','August','September','October','November','December'];
var day_array = ['Mon','Tues','Wed','Thur','Fri','Sat','Sun'];
@@ -609,15 +609,15 @@ function insertElements(tempFriendlyTime, starttimehour, starttimemin, stoptimeh
tr.appendChild(td);
td = d.createElement("td");
- td.innerHTML="<input type='text' readonly class='vexpl' name='starttime" + schCounter + "' id='starttime" + schCounter + "' style=' word-wrap:break-word; width:100%; border:0px solid;' value='" + starttimehour + ":" + starttimemin + "'>";
+ td.innerHTML="<input type='text' readonly class='vexpl' name='starttime" + schCounter + "' id='starttime" + schCounter + "' style=' word-wrap:break-word; width:100%; border:0px solid;' value='" + starttimehour + ":" + starttimemin + "' />";
tr.appendChild(td);
td = d.createElement("td");
- td.innerHTML="<input type='text' readonly class='vexpl' name='stoptime" + schCounter + "' id='stoptime" + schCounter + "' style=' word-wrap:break-word; width:100%; border:0px solid;' value='" + stoptimehour + ":" + stoptimemin + "'>";
+ td.innerHTML="<input type='text' readonly class='vexpl' name='stoptime" + schCounter + "' id='stoptime" + schCounter + "' style=' word-wrap:break-word; width:100%; border:0px solid;' value='" + stoptimehour + ":" + stoptimemin + "' />";
tr.appendChild(td);
td = d.createElement("td");
- td.innerHTML="<input type='text' readonly class='vexpl' name='timedescr" + schCounter + "' id='timedescr" + schCounter + "' style=' word-wrap:break-word; width:100%; border:0px solid;' value='" + tempdescr + "'>";
+ td.innerHTML="<input type='text' readonly class='vexpl' name='timedescr" + schCounter + "' id='timedescr" + schCounter + "' style=' word-wrap:break-word; width:100%; border:0px solid;' value='" + tempdescr + "' />";
tr.appendChild(td);
td = d.createElement("td");
@@ -629,7 +629,7 @@ function insertElements(tempFriendlyTime, starttimehour, starttimemin, stoptimeh
tr.appendChild(td);
td = d.createElement("td");
- td.innerHTML="<input type='hidden' id='schedule" + schCounter + "' name='schedule" + schCounter + "' value='" + tempID + "'>";
+ td.innerHTML="<input type='hidden' id='schedule" + schCounter + "' name='schedule" + schCounter + "' value='" + tempID + "' />";
tr.appendChild(td);
tbody.appendChild(tr);
@@ -751,7 +751,7 @@ function removeRow(el) {
}
}
}
-
+//]]>
</script>
EOD;
?>
@@ -781,7 +781,7 @@ EOD;
<span class="vexpl"><?=gettext("NOTE: This schedule is in use so the name may not be modified!");?></span>
</p>
<?php else: ?>
- <input name="name" type="text" id="name" size="40" maxlength="40" class="formfld unknown" value="<?=htmlspecialchars($pconfig['name']);?>"><br>
+ <input name="name" type="text" id="name" size="40" maxlength="40" class="formfld unknown" value="<?=htmlspecialchars($pconfig['name']);?>" /><br/>
<span class="vexpl">
<?=gettext("The name of the alias may only consist of the characters a-z, A-Z and 0-9");?>
</span>
@@ -790,15 +790,15 @@ EOD;
</tr>
<tr>
<td width="15%" valign="top" class="vncell"><?=gettext("Description");?></td>
- <td width="85%" class="vtable"><input name="descr" type="text" id="descr" size="40" maxlength="40" class="formfld unknown" value="<?=htmlspecialchars($pconfig['descr']);?>"><br>
+ <td width="85%" class="vtable"><input name="descr" type="text" id="descr" size="40" maxlength="40" class="formfld unknown" value="<?=htmlspecialchars($pconfig['descr']);?>" /><br/>
<span class="vexpl">
<?=gettext("You may enter a description here for your reference (not parsed).");?>
</span>
</td>
</tr>
- <tr>
- </tr>
+ <!-- tr>
+ </tr -->
<tr>
<td width="15%" valign="top" class="vncellreq"><?=gettext("Month");?></td>
<td width="85%" class="vtable">
@@ -820,7 +820,7 @@ EOD;
$monthcounter++;
}
} ?>
- </select><br><br>
+ </select><br/><br/>
<?php
$firstmonth = TRUE;
$monthcounter = date("n");
@@ -837,19 +837,19 @@ EOD;
$lasttr = FALSE;
$positioncounter = 1;//7 for Sun, 1 for Mon, 2 for Tues, etc
?>
- <div id="<?php echo date("F y",mktime(0, 0, 0, date($monthcounter), 1, date($yearcounter)));?>" z-index:-1000; style="position:relative; display:<?php if($firstmonth)echo "block";else echo "none";?>">
- <TABLE BORDER=1 CELLSPACING=1 CELLPADDING=1 id="calTable" class="tabcont">
- <TR><TD COLSPAN="7" ALIGN=center class="listbg"><B><?php echo date("F Y", mktime(0, 0, 0, date($monthcounter), 1, date($yearcounter)));?></B></TD>
- </TR>
- <TR>
- <TD ALIGN=center class="listhdrr" style="cursor: pointer;" onClick="daytoggle('w1p1');"><u><b><?=gettext("Mon");?></b></u></TD>
- <TD ALIGN=center class="listhdrr" style="cursor: pointer;" onClick="daytoggle('w1p2');"><u><b><?=gettext("Tue");?></b></u></TD>
- <TD ALIGN=center class="listhdrr" style="cursor: pointer;" onClick="daytoggle('w1p3');"><u><b><?=gettext("Wed");?></b></u></TD>
- <TD ALIGN=center class="listhdrr" style="cursor: pointer;" onClick="daytoggle('w1p4');"><u><b><?=gettext("Thu");?></b></u></TD>
- <TD ALIGN=center class="listhdrr" style="cursor: pointer;" onClick="daytoggle('w1p5');"><u><b><?=gettext("Fri");?></b></u></TD>
- <TD ALIGN=center class="listhdrr" style="cursor: pointer;" onClick="daytoggle('w1p6');"><u><b><?=gettext("Sat");?></b></u></TD>
- <TD ALIGN=center class="listhdrr" style="cursor: pointer;" onClick="daytoggle('w1p7');"><u><b><?=gettext("Sun");?></b></u></TD>
- </TR>
+ <div id="<?php echo date("F y",mktime(0, 0, 0, date($monthcounter), 1, date($yearcounter)));?>" style=" position:relative; display:<?php if($firstmonth)echo "block";else echo "none";?>">
+ <table border="1" cellspacing="1" cellpadding="1" id="calTable" class="tabcont">
+ <tr><td colspan="7" align="center" class="listbg"><b><?php echo date("F Y", mktime(0, 0, 0, date($monthcounter), 1, date($yearcounter)));?></b></td>
+ </tr>
+ <tr>
+ <td align="center" class="listhdrr" style="cursor: pointer;" onclick="daytoggle('w1p1');"><u><b><?=gettext("Mon");?></b></u></td>
+ <td align="center" class="listhdrr" style="cursor: pointer;" onclick="daytoggle('w1p2');"><u><b><?=gettext("Tue");?></b></u></td>
+ <td align="center" class="listhdrr" style="cursor: pointer;" onclick="daytoggle('w1p3');"><u><b><?=gettext("Wed");?></b></u></td>
+ <td align="center" class="listhdrr" style="cursor: pointer;" onclick="daytoggle('w1p4');"><u><b><?=gettext("Thu");?></b></u></td>
+ <td align="center" class="listhdrr" style="cursor: pointer;" onclick="daytoggle('w1p5');"><u><b><?=gettext("Fri");?></b></u></td>
+ <td align="center" class="listhdrr" style="cursor: pointer;" onclick="daytoggle('w1p6');"><u><b><?=gettext("Sat");?></b></u></td>
+ <td align="center" class="listhdrr" style="cursor: pointer;" onclick="daytoggle('w1p7');"><u><b><?=gettext("Sun");?></b></u></td>
+ </tr>
<?php
$firstmonth = FALSE;
while ($daycounter<=$numberofdays){
@@ -860,21 +860,21 @@ EOD;
echo "<tr>";
}
if ($firstdayofmonth == $positioncounter){?>
- <TD ALIGN=center style="cursor: pointer;" class="listr" id="w<?=$weekcounter;?>p<?=$positioncounter;?>" onClick="daytoggle('w<?=$weekcounter;?>p<?=$positioncounter;?>-m<?=$monthcounter;?>d<?=$daycounter;?>');">
+ <td align="center" style="cursor: pointer;" class="listr" id="w<?=$weekcounter;?>p<?=$positioncounter;?>" onclick="daytoggle('w<?=$weekcounter;?>p<?=$positioncounter;?>-m<?=$monthcounter;?>d<?=$daycounter;?>');">
<?php echo $daycounter;
$daycounter++;
$firstdayprinted = TRUE;
echo "</td>";
}
elseif ($firstdayprinted == TRUE && $daycounter <= $numberofdays){?>
- <TD ALIGN=center style="cursor: pointer;" class="listr" id="w<?=$weekcounter;?>p<?=$positioncounter;?>" onClick="daytoggle('w<?=$weekcounter;?>p<?=$positioncounter;?>-m<?=$monthcounter;?>d<?=$daycounter;?>');">
+ <td align="center" style="cursor: pointer;" class="listr" id="w<?=$weekcounter;?>p<?=$positioncounter;?>" onclick="daytoggle('w<?=$weekcounter;?>p<?=$positioncounter;?>-m<?=$monthcounter;?>d<?=$daycounter;?>');">
<?php echo $daycounter;
$daycounter++;
echo "</td>";
}
else
{
- echo "<td align=center class=\"listr\"></td>";
+ echo "<td align=\"center\" class=\"listr\"></td>";
}
if ($positioncounter ==7){
@@ -886,7 +886,7 @@ EOD;
}
}//end while loop?>
- </TABLE>
+ </table>
</div>
<?php
@@ -908,7 +908,7 @@ EOD;
<tr>
<td width="15%" valign="top" class="vncellreq"><?=gettext("Time");?></td>
<td width="85%" class="vtable">
- <table cellspacing=2 class="tabcont">
+ <table cellspacing="2" class="tabcont">
<tr>
<td class="listhdrr" align="center"><?=gettext("Start Time");?></td><td></td><td class="listhdrr" align="center"><?=gettext("Stop Time");?></td>
</tr>
@@ -939,7 +939,7 @@ EOD;
for ($i=0; $i<24; $i++)
{
if ($i==23)
- $selected = "SELECTED";
+ $selected = "selected=\"selected\"";
else
$selected = "";
@@ -954,17 +954,17 @@ EOD;
<option value="15">15</option>
<option value="30">30</option>
<option value="45">45</option>
- <option value="59" SELECTED>59</option>
+ <option value="59" selected="selected">59</option>
</select>&nbsp;<?=gettext("Min");?>
</td>
</tr>
- </table><br>
+ </table><br/>
<?=gettext("Select the time range for the day(s) selected on the Month(s) above. A full day is 0:00-23:59.")?>
</td>
</tr>
<tr>
<td width="15%" valign="top" class="vncell"><?=gettext("Time Range Description")?></td>
- <td width="85%" class="vtable"><input name="timerangedescr" type="text" class="formfld unknown" id="timerangedescr" size="40" maxlength="40"><br>
+ <td width="85%" class="vtable"><input name="timerangedescr" type="text" class="formfld unknown" id="timerangedescr" size="40" maxlength="40" /><br/>
<span class="vexpl">
<?=gettext("You may enter a description here for your reference (not parsed).")?>
</span>
@@ -973,8 +973,8 @@ EOD;
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input type="button" value="<?=gettext("Add Time");?>" class="formbtn" onclick="javascript:processEntries();">&nbsp;&nbsp;&nbsp;
- <input type="button" value="<?=gettext("Clear Selection");?>" class="formbtn" onclick="javascript:clearCalendar(); clearTime(); clearDescr();">
+ <input type="button" value="<?=gettext("Add Time");?>" class="formbtn" onclick="javascript:processEntries();" />&nbsp;&nbsp;&nbsp;
+ <input type="button" value="<?=gettext("Clear Selection");?>" class="formbtn" onclick="javascript:clearCalendar(); clearTime(); clearDescr();" />
</td>
</tr>
<tr>
@@ -991,10 +991,10 @@ EOD;
<table id="scheduletable">
<tbody>
<tr>
- <TD ALIGN="center" class="listbg" width="35%"><?=gettext("Day(s)");?></td>
- <TD ALIGN="center" class="listbg" width="12%"><?=gettext("Start Time");?></td>
- <TD ALIGN="center" class="listbg" width="11%"><?=gettext("Stop Time");?></td>
- <TD ALIGN="center" class="listbg" width="42%"><?=gettext("Description");?></td>
+ <td align="center" class="listbg" width="35%"><?=gettext("Day(s)");?></td>
+ <td align="center" class="listbg" width="12%"><?=gettext("Start Time");?></td>
+ <td align="center" class="listbg" width="11%"><?=gettext("Stop Time");?></td>
+ <td align="center" class="listbg" width="42%"><?=gettext("Description");?></td>
</tr>
<?php
if ($getSchedule){
@@ -1121,13 +1121,13 @@ EOD;
<span class="vexpl"><?php echo $tempFriendlyTime; ?><span>
</td>
<td>
- <input type='text' readonly class='vexpl' name='starttime<?php echo $counter; ?>' id='starttime<?php echo $counter; ?>' style=' word-wrap:break-word; width:100%; border:0px solid;' value='<?php echo $starttime; ?>'>
+ <input type='text' readonly class='vexpl' name='starttime<?php echo $counter; ?>' id='starttime<?php echo $counter; ?>' style=' word-wrap:break-word; width:100%; border:0px solid;' value='<?php echo $starttime; ?>' />
</td>
<td>
- <input type='text' readonly class='vexpl' name='stoptime<?php echo $counter; ?>' id='stoptime<?php echo $counter; ?>' style=' word-wrap:break-word; width:100%; border:0px solid;' value='<?php echo $stoptime; ?>'>
+ <input type='text' readonly class='vexpl' name='stoptime<?php echo $counter; ?>' id='stoptime<?php echo $counter; ?>' style=' word-wrap:break-word; width:100%; border:0px solid;' value='<?php echo $stoptime; ?>' />
</td>
<td>
- <input type='text' readonly class='vexpl' name='timedescr<?php echo $counter; ?>' id='timedescr<?php echo $counter; ?>' style=' word-wrap:break-word; width:100%; border:0px solid;' value='<?php echo $timedescr; ?>'>
+ <input type='text' readonly class='vexpl' name='timedescr<?php echo $counter; ?>' id='timedescr<?php echo $counter; ?>' style=' word-wrap:break-word; width:100%; border:0px solid;' value='<?php echo $timedescr; ?>' />
</td>
<td>
<a onclick='editRow("<?php echo $tempTime; ?>",this); return false;' href='#'><img border='0' src='/themes/<?php echo $g['theme']; ?>/images/icons/icon_e.gif' /></a>
@@ -1136,7 +1136,7 @@ EOD;
<a onclick='removeRow(this); return false;' href='#'><img border='0' src='/themes/<?php echo $g['theme']; ?>/images/icons/icon_x.gif' /></a>
</td>
<td>
- <input type='hidden' id='schedule<?php echo $counter; ?>' name='schedule<?php echo $counter; ?>' value='<?php echo $tempID; ?>'>
+ <input type='hidden' id='schedule<?php echo $counter; ?>' name='schedule<?php echo $counter; ?>' value='<?php echo $tempID; ?>' />
</td>
</tr>
<?php
@@ -1145,7 +1145,7 @@ EOD;
} // end foreach
}//end if
?>
- </tdody>
+ </tbody>
</table>
</td>
</tr>
@@ -1164,4 +1164,4 @@ EOD;
</td></tr></table></form>
<?php include("fend.inc"); ?>
</body>
-</html> \ No newline at end of file
+</html>
OpenPOWER on IntegriCloud