summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorColin Fleming <cj_fleming@sky.com>2013-04-09 12:48:13 +0100
committerColin Fleming <cj_fleming@sky.com>2013-04-09 12:48:13 +0100
commit709e62f0e935e4a1dd24265d6693e0de6c0c8c1b (patch)
tree645e6fe028c4110a6d4ad8e7f78bc71265e894ad /usr
parent4fd2fed2ad6672c3be771146048bee61317f3197 (diff)
downloadpfsense-709e62f0e935e4a1dd24265d6693e0de6c0c8c1b.zip
pfsense-709e62f0e935e4a1dd24265d6693e0de6c0c8c1b.tar.gz
Tidy up "firewall_aliases*.php" XHTML
Add CDATA sections to SCRIPT tags Close INPUT and BR tags Update HTML boolean operators Move NOWRAP to class statement Add missing closing TD tag
Diffstat (limited to 'usr')
-rwxr-xr-xusr/local/www/firewall_aliases.php32
-rwxr-xr-xusr/local/www/firewall_aliases_edit.php38
-rwxr-xr-xusr/local/www/firewall_aliases_import.php9
3 files changed, 38 insertions, 41 deletions
diff --git a/usr/local/www/firewall_aliases.php b/usr/local/www/firewall_aliases.php
index e5de4b6..4bc852b 100755
--- a/usr/local/www/firewall_aliases.php
+++ b/usr/local/www/firewall_aliases.php
@@ -163,10 +163,10 @@ include("head.inc");
<form action="firewall_aliases.php" method="post">
<?php if ($savemsg) print_info_box($savemsg); ?>
<?php if (is_subsystem_dirty('aliases')): ?><p>
-<?php print_info_box_np(gettext("The alias list has been changed.") . "<br>" . gettext("You must apply the changes in order for them to take effect."));?>
+<?php print_info_box_np(gettext("The alias list has been changed.") . "<br/>" . gettext("You must apply the changes in order for them to take effect."));?>
<?php endif; ?>
<?php pfSense_handle_custom_code("/usr/local/pkg/firewall_aliases/pre_table"); ?>
-<table width="100%" border="0" cellpadding="0" cellspacing="0" >
+<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="firewall aliases">
<tr>
<td class="tabnavtbl">
<?php
@@ -177,22 +177,22 @@ include("head.inc");
$tab_array[] = array(gettext("All"), ($tab=="all"? true : false), "/firewall_aliases.php?tab=all");
display_top_tabs($tab_array);
?>
- <input type="hidden" name="tab" value="<?=htmlspecialchars($tab);?>">
+ <input type="hidden" name="tab" value="<?=htmlspecialchars($tab);?>" />
</td>
</tr>
<tr>
<td>
<div id="mainarea">
- <table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0">
+ <table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0" summary="main area">
<tr>
<td width="20%" class="listhdrr"><?=gettext("Name"); ?></td>
<td width="43%" class="listhdrr"><?=gettext("Values"); ?></td>
<td width="30%" class="listhdr"><?=gettext("Description"); ?></td>
<td width="7%" class="list">
- <table border="0" cellspacing="0" cellpadding="1">
+ <table border="0" cellspacing="0" cellpadding="1" summary="add">
<tr>
<td valign="middle" width="17">&nbsp;</td>
- <td valign="middle"><a href="firewall_aliases_edit.php?tab=<?=$tab?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" <?=dom_title(gettext("Add a new alias"));?>></a></td>
+ <td valign="middle"><a href="firewall_aliases_edit.php?tab=<?=$tab?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" <?=dom_title(gettext("Add a new alias"));?> alt="add" /></a></td>
</tr>
</table>
</td>
@@ -250,11 +250,11 @@ include("head.inc");
<td class="listbg" ondblclick="document.location='firewall_aliases_edit.php?id=<?=$i;?>';">
<?=htmlspecialchars($alias['descr']);?>&nbsp;
</td>
- <td valign="middle" nowrap class="list">
- <table border="0" cellspacing="0" cellpadding="1">
+ <td valign="middle" class="list nowrap">
+ <table border="0" cellspacing="0" cellpadding="1" summary="icons">
<tr>
- <td valign="middle"><a href="firewall_aliases_edit.php?id=<?=$i;?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0" <?=dom_title(gettext("Edit alias")." {$alias['name']}");?>></a></td>
- <td><a href="firewall_aliases.php?act=del&tab=<?=$tab;?>&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this alias? All elements that still use it will become invalid (e.g. filter rules)!");?>')"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0" <?=dom_title(gettext("Delete alias")." {$alias['name']}");?>></a></td>
+ <td valign="middle"><a href="firewall_aliases_edit.php?id=<?=$i;?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0" <?=dom_title(gettext("Edit alias")." {$alias['name']}");?> alt="edit" /></a></td>
+ <td><a href="firewall_aliases.php?act=del&amp;tab=<?=$tab;?>&amp;id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this alias? All elements that still use it will become invalid (e.g. filter rules)!");?>')"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0" <?=dom_title(gettext("Delete alias")." {$alias['name']}");?> alt="delete" /></a></td>
</tr>
</table>
</td>
@@ -265,16 +265,16 @@ include("head.inc");
?>
<tr>
- <td colspan="3"/>&nbsp;</td>
- <td valign="middle" nowrap class="list">
- <table border="0" cellspacing="0" cellpadding="1">
+ <td colspan="3">&nbsp;</td>
+ <td valign="middle" class="list nowrap">
+ <table border="0" cellspacing="0" cellpadding="1" summary="edit">
<tbody>
<tr>
<td valign="middle">
- <a href="firewall_aliases_edit.php?tab=<?=$tab?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" <?=dom_title(gettext("Add a new alias")); ?>></a>
+ <a href="firewall_aliases_edit.php?tab=<?=$tab?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" <?=dom_title(gettext("Add a new alias")); ?> alt="add" /></a>
</td>
<td valign="middle">
- <a href="firewall_aliases_import.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_import_alias.gif" width="17" height="17" border="0" <?=dom_title(gettext("Bulk import aliases from list"));?> alt="" /></a>
+ <a href="firewall_aliases_import.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_import_alias.gif" width="17" height="17" border="0" <?=dom_title(gettext("Bulk import aliases from list"));?> alt="import" /></a>
</td>
</tr>
</tbody>
@@ -284,7 +284,7 @@ include("head.inc");
<tr>
<td class="tabcont" colspan="3">
- <p><span class="vexpl"><span class="red"><strong><?=gettext("Note:"); ?><br></strong></span><div style="overflow:hidden; text-align:justify;"><?=gettext("Aliases act as placeholders for real hosts, networks or ports. They can be used to minimize the number of changes that have to be made if a host, network or port changes. You can enter the name of an alias instead of the host, network or port in all fields that have a red background. The alias will be resolved according to the list above. If an alias cannot be resolved (e.g. because you deleted it), the corresponding element (e.g. filter/NAT/shaper rule) will be considered invalid and skipped."); ?></div></span></p>
+ <p><span class="vexpl"><span class="red"><strong><?=gettext("Note:"); ?><br/></strong></span></span></p><div style="overflow:hidden; text-align:justify;"><p><span class="vexpl"><?=gettext("Aliases act as placeholders for real hosts, networks or ports. They can be used to minimize the number of changes that have to be made if a host, network or port changes. You can enter the name of an alias instead of the host, network or port in all fields that have a red background. The alias will be resolved according to the list above. If an alias cannot be resolved (e.g. because you deleted it), the corresponding element (e.g. filter/NAT/shaper rule) will be considered invalid and skipped."); ?></span></p></div>
</td>
</tr>
</table>
diff --git a/usr/local/www/firewall_aliases_edit.php b/usr/local/www/firewall_aliases_edit.php
index c4cb849..ca5fd9e 100755
--- a/usr/local/www/firewall_aliases_edit.php
+++ b/usr/local/www/firewall_aliases_edit.php
@@ -386,7 +386,7 @@ include("head.inc");
$jscriptstr = <<<EOD
<script type="text/javascript">
-
+//<![CDATA[
var objAlias = new Array(4999);
function typesel_change() {
switch (document.iform.type.selectedIndex) {
@@ -540,6 +540,7 @@ function update_box_type() {
document.getElementById ("addrowbutton").style.display = 'none';
}
}
+//]]>
</script>
EOD;
@@ -552,19 +553,16 @@ EOD;
echo $jscriptstr;
?>
-<script type="text/javascript" src="/javascript/jquery.ipv4v6ify.js">
-</script>
-<script type="text/javascript" src="/javascript/row_helper.js">
-</script>
-<script type="text/javascript" src="/javascript/autosuggest.js">
-</script>
-<script type="text/javascript" src="/javascript/suggestions.js">
-</script>
+<script type="text/javascript" src="/javascript/jquery.ipv4v6ify.js"></script>
+<script type="text/javascript" src="/javascript/row_helper.js"></script>
+<script type="text/javascript" src="/javascript/autosuggest.js"></script>
+<script type="text/javascript" src="/javascript/suggestions.js"></script>
<input type='hidden' name='address_type' value='textbox' />
<input type='hidden' name='address_subnet_type' value='select' />
<script type="text/javascript">
+//<![CDATA[
rowname[0] = "address";
rowtype[0] = "textbox,ipv4v6";
rowsize[0] = "30";
@@ -576,6 +574,7 @@ EOD;
rowname[2] = "detail";
rowtype[2] = "textbox";
rowsize[2] = "50";
+//]]>
</script>
<?php pfSense_handle_custom_code("/usr/local/pkg/firewall_aliases_edit/pre_input_errors"); ?>
@@ -594,7 +593,7 @@ if (empty($tab)) {
}
?>
<input name="tab" type="hidden" id="tab" value="<?=htmlspecialchars($tab);?>" />
-<table class="tabcont" width="100%" border="0" cellpadding="6" cellspacing="0">
+<table class="tabcont" width="100%" border="0" cellpadding="6" cellspacing="0" summary="firewall aliases edit">
<tr>
<td colspan="2" valign="top" class="listtopic"><?=gettext("Alias Edit"); ?></td>
</tr>
@@ -627,19 +626,19 @@ if (empty($tab)) {
<td valign="top" class="vncellreq"><?=gettext("Type"); ?></td>
<td class="vtable">
<select name="type" class="formselect" id="type" onchange="update_box_type(); typesel_change();">
- <option value="host" <?php if ($pconfig['type'] == "host") echo "selected"; ?>><?=gettext("Host(s)"); ?></option>
- <option value="network" <?php if ($pconfig['type'] == "network") echo "selected"; ?>><?=gettext("Network(s)"); ?></option>
- <option value="port" <?php if ($pconfig['type'] == "port") echo "selected"; ?>><?=gettext("Port(s)"); ?></option>
- <!--<option value="openvpn" <?php if ($pconfig['type'] == "openvpn") echo "selected"; ?>><?=gettext("OpenVPN Users"); ?></option> -->
- <option value="url" <?php if ($pconfig['type'] == "url") echo "selected"; ?>><?=gettext("URL");?></option>
- <option value="urltable" <?php if ($pconfig['type'] == "urltable") echo "selected"; ?>><?=gettext("URL Table"); ?></option>
+ <option value="host" <?php if ($pconfig['type'] == "host") echo "selected=\"selected\""; ?>><?=gettext("Host(s)"); ?></option>
+ <option value="network" <?php if ($pconfig['type'] == "network") echo "selected=\"selected\""; ?>><?=gettext("Network(s)"); ?></option>
+ <option value="port" <?php if ($pconfig['type'] == "port") echo "selected=\"selected\""; ?>><?=gettext("Port(s)"); ?></option>
+ <!--<option value="openvpn" <?php if ($pconfig['type'] == "openvpn") echo "selected=\"selected\""; ?>><?=gettext("OpenVPN Users"); ?></option> -->
+ <option value="url" <?php if ($pconfig['type'] == "url") echo "selected=\"selected\""; ?>><?=gettext("URL");?></option>
+ <option value="urltable" <?php if ($pconfig['type'] == "urltable") echo "selected=\"selected\""; ?>><?=gettext("URL Table"); ?></option>
</select>
</td>
</tr>
<tr>
<td width="22%" valign="top" class="vncellreq"><div id="addressnetworkport"><?=gettext("Host(s)"); ?></div></td>
<td width="78%" class="vtable">
- <table id="maintable">
+ <table id="maintable" summary="maintable">
<tbody>
<tr>
<td colspan="4">
@@ -680,7 +679,7 @@ if (empty($tab)) {
<select name="address_subnet<?php echo $tracker; ?>" class="formselect ipv4v6" id="address_subnet<?php echo $tracker; ?>">
<option></option>
<?php for ($i = 128; $i >= 1; $i--): ?>
- <option value="<?=$i;?>" <?php if (($i == $address_subnet) || ($i == $pconfig['updatefreq'])) echo "selected"; ?>><?=$i;?></option>
+ <option value="<?=$i;?>" <?php if (($i == $address_subnet) || ($i == $pconfig['updatefreq'])) echo "selected=\"selected\""; ?>><?=$i;?></option>
<?php endfor; ?>
</select>
</td>
@@ -698,9 +697,6 @@ if (empty($tab)) {
} // end if
?>
</tbody>
- <tfoot>
-
- </tfoot>
</table>
<div id="addrowbutton">
<a onclick="javascript:addRowTo('maintable', 'formfldalias'); typesel_change(); add_alias_control(this); return false;" href="#">
diff --git a/usr/local/www/firewall_aliases_import.php b/usr/local/www/firewall_aliases_import.php
index de52671..776b348 100755
--- a/usr/local/www/firewall_aliases_import.php
+++ b/usr/local/www/firewall_aliases_import.php
@@ -126,7 +126,7 @@ include("head.inc");
<div id="niftyOutter">
<form action="firewall_aliases_import.php" method="post" name="iform" id="iform">
<div id="inputerrors"></div>
-<table width="100%" border="0" cellpadding="6" cellspacing="0">
+<table width="100%" border="0" cellpadding="6" cellspacing="0" summary="firewall alias import">
<tr>
<td colspan="2" valign="top" class="listtopic"><?=gettext("Alias Import"); ?></td>
</tr>
@@ -144,7 +144,7 @@ include("head.inc");
</tr>
<tr>
<td valign="top" class="vncellreq"><?=gettext("Aliases to import"); ?></td>
- <td class="vtable"><textarea name="aliasimport" ROWS="15" COLS="40"><?php echo $_POST['aliasimport']; ?></textarea>
+ <td class="vtable"><textarea name="aliasimport" rows="15" cols="40"><?php echo $_POST['aliasimport']; ?></textarea>
<br /> <span class="vexpl"><?=gettext("Paste in the aliases to import separated by a carriage return. Common examples are lists of IPs, networks, blacklists, etc."); ?>
<br /> <?=gettext("The list may contain only IP addresses."); ?> </span></td>
</tr>
@@ -153,7 +153,7 @@ include("head.inc");
<td width="78%">
<input id="submit" name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>" />
<input class="formbtn" type="button" value="<?=gettext("Cancel"); ?>" onclick="history.back()" />
- </tr>
+ </td></tr>
</table>
@@ -163,10 +163,11 @@ include("head.inc");
<?php include("fend.inc"); ?>
<script type="text/javascript">
+//<![CDATA[
NiftyCheck();
Rounded("div#nifty","top","#FFF","#EEEEEE","smooth");
+//]]>
</script>
-
</body>
</html>
OpenPOWER on IntegriCloud