diff options
author | Colin Fleming <cj_fleming@sky.com> | 2014-05-08 23:02:17 +0100 |
---|---|---|
committer | Colin Fleming <cj_fleming@sky.com> | 2014-05-08 23:02:17 +0100 |
commit | 391453a1c40cd4e382c7203742da8adca1a52105 (patch) | |
tree | 4bf1c0ea6d8bb8cd1a63b92fe137dd09113cb320 /usr/local/www | |
parent | 0a15a38d75ebebdeda4727580e82290e87663816 (diff) | |
download | pfsense-391453a1c40cd4e382c7203742da8adca1a52105.zip pfsense-391453a1c40cd4e382c7203742da8adca1a52105.tar.gz |
Tidy up "vpn_ipsec" XHTML
Add CDATA section to SCRIPTS
Add SUMMARY to TABLES
Update HTML Boolean operators
Close INPUT and IMG tags and ALT to IMG tags
Move NOWRAP into CLASS statement
Deprecate ampersand in Anchor tags
Diffstat (limited to 'usr/local/www')
-rw-r--r-- | usr/local/www/vpn_ipsec.php | 62 | ||||
-rw-r--r-- | usr/local/www/vpn_ipsec_settings.php | 13 |
2 files changed, 39 insertions, 36 deletions
diff --git a/usr/local/www/vpn_ipsec.php b/usr/local/www/vpn_ipsec.php index 1d801aa..63926fa 100644 --- a/usr/local/www/vpn_ipsec.php +++ b/usr/local/www/vpn_ipsec.php @@ -130,7 +130,7 @@ include("head.inc"); if ($pconfig['enable'] && is_subsystem_dirty('ipsec')) print_info_box_np(gettext("The IPsec tunnel configuration has been changed") . ".<br />" . gettext("You must apply the changes in order for them to take effect.")); ?> -<table width="100%" border="0" cellpadding="0" cellspacing="0"> +<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="vpn ipsec"> <tr> <td class="tabnavtbl"> <?php @@ -146,13 +146,13 @@ include("head.inc"); <tr> <td> <div id="mainarea"> - <table class="tabcont" width="100%" border="0" cellpadding="6" cellspacing="0"> + <table class="tabcont" width="100%" border="0" cellpadding="6" cellspacing="0" summary="main area"> <tr> <td class="vtable"> - <table border="0" cellspacing="2" cellpadding="0"> + <table border="0" cellspacing="2" cellpadding="0" summary="enable"> <tr> <td> - <input name="enable" type="checkbox" id="enable" value="yes" <?php if ($pconfig['enable']) echo "checked";?>> + <input name="enable" type="checkbox" id="enable" value="yes" <?php if ($pconfig['enable']) echo "checked=\"checked\"";?> /> </td> <td> <strong><?=gettext("Enable IPsec"); ?></strong> @@ -163,11 +163,11 @@ include("head.inc"); </tr> <tr> <td> - <input name="submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>"> + <input name="submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>" /> </td> </tr> </table> - <table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0"> + <table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0" summary="phase-1 entries"> <?php $i = 0; foreach ($a_phase1 as $ph1ent) { @@ -244,17 +244,17 @@ include("head.inc"); <?=htmlspecialchars($ph1ent['descr']);?> <?=$spane;?> </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> <a href="vpn_ipsec_phase1.php?p1index=<?=$i;?>"> - <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" title="<?=gettext("edit phase1 entry"); ?>" width="17" height="17" border="0"> + <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" title="<?=gettext("edit phase1 entry"); ?>" width="17" height="17" border="0" alt="edit" /> </a> </td> <td> - <a href="vpn_ipsec.php?act=delph1&p1index=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this phase1 and all associated phase2 entries?"); ?>')"> - <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" title="<?=gettext("delete phase1 entry"); ?>" width="17" height="17" border="0"> + <a href="vpn_ipsec.php?act=delph1&p1index=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this phase1 and all associated phase2 entries?"); ?>')"> + <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" title="<?=gettext("delete phase1 entry"); ?>" width="17" height="17" border="0" alt="delete" /> </a> </td> </tr> @@ -264,7 +264,7 @@ include("head.inc"); </td> <td> <a href="vpn_ipsec_phase1.php?dup=<?=$i;?>"> - <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("copy phase1 entry"); ?>" width="17" height="17" border="0"> + <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("copy phase1 entry"); ?>" width="17" height="17" border="0" alt="add" /> </a> </td> </tr> @@ -285,9 +285,9 @@ include("head.inc"); $phase2count++; } ?> - <input type="button" onClick="show_phase2('tdph2-<?=$i?>','shph2but-<?=$i?>')" value="+" /> - <?php printf(gettext("Show %s Phase-2 entries"), $phase2count); ?></a> + <input type="button" onclick="show_phase2('tdph2-<?=$i?>','shph2but-<?=$i?>')" value="+" /> - <?php printf(gettext("Show %s Phase-2 entries"), $phase2count); ?> </div> - <table class="tabcont" width="100%" height="100%" border="0" cellspacing="0" cellpadding="0" id="tdph2-<?=$i?>" style="display:none"> + <table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="0" id="tdph2-<?=$i?>" style="display:none" summary="phase-2 entries"> <tr> <td class="listhdrr"><?=gettext("Mode"); ?></td> <?php if(($ph2ent['mode'] == "tunnel") or ($ph2ent['mode'] == "tunnel6")): ?> @@ -298,8 +298,8 @@ include("head.inc"); <td class="listhdrr"><?=gettext("P2 Transforms"); ?></td> <td class="listhdrr"><?=gettext("P2 Auth Methods"); ?></td> <td class ="list"> - <a href="vpn_ipsec_phase2.php?ikeid=<?=$ph1ent['ikeid'];?><?php if (isset($ph1ent['mobile'])) echo "&mobile=true";?>"> - <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add phase2 entry"); ?>" width="17" height="17" border="0"> + <a href="vpn_ipsec_phase2.php?ikeid=<?=$ph1ent['ikeid'];?><?php if (isset($ph1ent['mobile'])) echo "&mobile=true";?>"> + <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add phase2 entry"); ?>" width="17" height="17" border="0" alt="add" /> </a> </td> </tr> @@ -320,29 +320,29 @@ include("head.inc"); ?> <tr valign="top" ondblclick="document.location='vpn_ipsec_phase2.php?p2index=<?=$j;?>'"> - <td nowrap class="listlr"> + <td class="listlr nowrap"> <?=$spans;?> <?=$ph2ent['mode'];?> <?=$spane;?> </td> <?php if(($ph2ent['mode'] <> "tunnel") and ($ph2ent['mode'] <> "tunnel6")) { - echo "<td nowrap class=\"listr\"> </td><td nowrap class=\"listr\"> </td>"; + echo "<td class=\"listr nowrap\"> </td><td class=\"listr nowrap\"> </td>"; } ?> <?php if(($ph2ent['mode'] == "tunnel") or ($ph2ent['mode'] == "tunnel6")): ?> - <td nowrap class="listr"> + <td class="listr nowrap"> <?=$spans;?> <?=ipsec_idinfo_to_text($ph2ent['localid']); ?> <?=$spane;?> </td> - <td nowrap class="listr"> + <td class="listr nowrap"> <?=$spans;?> <?=ipsec_idinfo_to_text($ph2ent['remoteid']); ?> <?=$spane;?> </td> <?php endif; ?> - <td nowrap class="listr"> + <td class="listr nowrap"> <?=$spans;?> <?php echo $p2_protos[$ph2ent['protocol']]; ?> <?=$spane;?> @@ -365,7 +365,7 @@ include("head.inc"); ?> <?=$spane;?> </td> - <td nowrap class="listr"> + <td class="listr nowrap"> <?=$spans;?> <?php $k = 0; @@ -377,15 +377,15 @@ include("head.inc"); ?> <?=$spane;?> </td> - <td nowrap class="list"> + <td class="list nowrap"> <a href="vpn_ipsec_phase2.php?p2index=<?=$j;?>"> - <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" title="<?=gettext("edit phase2 entry"); ?>" width="17" height="17" border="0"> + <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" title="<?=gettext("edit phase2 entry"); ?>" width="17" height="17" border="0" alt="edit" /> </a> - <a href="vpn_ipsec.php?act=delph2&p1index=<?=$i;?>&p2index=<?=$j;?>" onclick="return confirm('<?=gettext("Do you really want to delete this phase2 entry?"); ?>')"> - <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" title="<?=gettext("delete phase2 entry"); ?>" width="17" height="17" border="0"> + <a href="vpn_ipsec.php?act=delph2&p1index=<?=$i;?>&p2index=<?=$j;?>" onclick="return confirm('<?=gettext("Do you really want to delete this phase2 entry?"); ?>')"> + <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" title="<?=gettext("delete phase2 entry"); ?>" width="17" height="17" border="0" alt="delete" /> </a> <a href="vpn_ipsec_phase2.php?dup=<?=$j;?>"> - <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add a new Phase 2 based on this one"); ?>" width="17" height="17" border="0"> + <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add a new Phase 2 based on this one"); ?>" width="17" height="17" border="0" alt="add" /> </a> </td> </tr> @@ -411,17 +411,17 @@ include("head.inc"); <tr> <td class="list" colspan="5"></td> <td class="list"> - <table border="0" cellspacing="0" cellpadding="1"> + <table border="0" cellspacing="0" cellpadding="1" summary="add"> <tr> <td width="17"></td> <td> <a href="vpn_ipsec_phase1.php"> - <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add phase1 entry"); ?>" width="17" height="17" border="0"> + <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add phase1 entry"); ?>" width="17" height="17" border="0" alt="add" /> </a> </td> </tr> </table> - <td> + </td> </tr> <tr> <td colspan="4"> @@ -445,11 +445,13 @@ include("head.inc"); </form> <?php include("fend.inc"); ?> <script type="text/javascript"> +//<![CDATA[ function show_phase2(id, buttonid) { document.getElementById(buttonid).innerHTML=''; aodiv = document.getElementById(id); aodiv.style.display = "block"; } +//]]> </script> </body> </html> diff --git a/usr/local/www/vpn_ipsec_settings.php b/usr/local/www/vpn_ipsec_settings.php index b4a5201..0cb9c17 100644 --- a/usr/local/www/vpn_ipsec_settings.php +++ b/usr/local/www/vpn_ipsec_settings.php @@ -122,7 +122,7 @@ include("head.inc"); <?php include("fbegin.inc"); ?> <script type="text/javascript"> -<!-- +//<![CDATA[ function maxmss_checked(obj) { if (obj.checked) @@ -131,7 +131,7 @@ function maxmss_checked(obj) { jQuery('#maxmss').attr('disabled','true'); } -//--> +//]]> </script> <form action="vpn_ipsec_settings.php" method="post" name="iform" id="iform"> @@ -143,7 +143,7 @@ function maxmss_checked(obj) { print_input_errors($input_errors); ?> -<table width="100%" border="0" cellpadding="0" cellspacing="0"> +<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="vpn ipsec settings"> <tr> <td class="tabnavtbl"> <?php @@ -159,7 +159,7 @@ function maxmss_checked(obj) { <tr> <td id="mainarea"> <div class="tabcont"> - <table width="100%" border="0" cellpadding="6" cellspacing="0"> + <table width="100%" border="0" cellpadding="6" cellspacing="0" summary="main area"> <tr> <td colspan="2" valign="top" class="listtopic"><?=gettext("IPSec Advanced Settings"); ?></td> </tr> @@ -189,7 +189,7 @@ function maxmss_checked(obj) { <td width="78%" class="vtable"> <strong><?=gettext("Start IPSec in debug mode based on sections selected"); ?></strong> <br /> - <table> + <table summary="ipsec debug"> <?php foreach ($ipsec_loglevels as $lkey => $ldescr): ?> <tr> <td width="22%" valign="top" class="vncell"><?=$ldescr;?></td> @@ -206,6 +206,7 @@ function maxmss_checked(obj) { </td> </tr> <?php endforeach; ?> + <tr style="display:none;"><td></td></tr> </table> <br /><?=gettext("Launches IPSec in debug mode so that more verbose logs " . "will be generated to aid in troubleshooting."); ?> @@ -238,7 +239,7 @@ function maxmss_checked(obj) { <tr> <td width="22%" valign="top"> </td> <td width="78%"> - <input name="submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>"> + <input name="submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>" /> </td> </tr> </table> |