summaryrefslogtreecommitdiffstats
path: root/usr/local/www/edit.php
diff options
context:
space:
mode:
authorColin Fleming <cj_fleming@sky.com>2014-05-17 17:30:26 +0100
committerColin Fleming <cj_fleming@sky.com>2014-05-17 17:30:26 +0100
commit74286b9ebd6f626fa115de170e58a65ca3701131 (patch)
treec2a074db776614904ce29b4825ff9dcd4748efad /usr/local/www/edit.php
parent024068017f98572f6bd41b7ba542fc36fccee39a (diff)
downloadpfsense-74286b9ebd6f626fa115de170e58a65ca3701131.zip
pfsense-74286b9ebd6f626fa115de170e58a65ca3701131.tar.gz
Tidy up "edit.php" XHTML
Add PHP closehead variable and close HEAD manually Add CDATA sections to SCRIPTS Add SUMMARY to TABLES Add JavaScript code to take off wrap in TEXTAREA tag
Diffstat (limited to 'usr/local/www/edit.php')
-rw-r--r--usr/local/www/edit.php22
1 files changed, 17 insertions, 5 deletions
diff --git a/usr/local/www/edit.php b/usr/local/www/edit.php
index f48b9bf..17729b6 100644
--- a/usr/local/www/edit.php
+++ b/usr/local/www/edit.php
@@ -86,17 +86,19 @@ if($_POST['action']) {
exit;
}
+$closehead = false;
require("head.inc");
outputCSSFileInline("code-syntax-highlighter/SyntaxHighlighter.css");
outputJavaScriptFileInline("filebrowser/browser.js");
outputJavaScriptFileInline("javascript/base64.js");
?>
-
+</head>
<body link="#000000" vlink="#000000" alink="#000000">
<?php include("fbegin.inc"); ?>
<script type="text/javascript">
+//<![CDATA[
function loadFile() {
jQuery("#fileStatus").html("<?=gettext("Loading file"); ?> ...");
jQuery("#fileStatusBox").show(500);
@@ -159,6 +161,7 @@ outputJavaScriptFileInline("javascript/base64.js");
}
);
}
+//]]>
</script>
<!-- file status box -->
@@ -170,12 +173,12 @@ outputJavaScriptFileInline("javascript/base64.js");
<br />
-<table width="100%" border="0" cellpadding="0" cellspacing="0">
+<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="file editor">
<tr>
<td class="tabcont" align="center">
<!-- controls -->
-<table width="100%" cellpadding="9" cellspacing="9">
+<table width="100%" cellpadding="9" cellspacing="9" summary="controls">
<tr>
<td align="center" class="list">
<?=gettext("Save / Load from path"); ?>:
@@ -197,11 +200,18 @@ outputJavaScriptFileInline("javascript/base64.js");
<div id="fbBrowser" style="display:none; border:1px dashed gray; width:98%;"></div>
<!-- file viewer/editor -->
-<table width="100%">
+<table width="100%" summary="file editor">
<tr>
<td valign="top">
<div style="background:#eeeeee;" id="fileOutput">
- <textarea id="fileContent" name="fileContent" style="width:100%;" rows="30" wrap="off"></textarea>
+ <script type="text/javascript">
+ //<![CDATA[
+ window.onload=function(){
+ document.getElementById("fileContent").wrap='off';
+ }
+ //]]>
+ </script>
+ <textarea id="fileContent" name="fileContent" style="width:100%;" rows="30" cols=""></textarea>
</div>
</td>
</tr>
@@ -217,6 +227,7 @@ outputJavaScriptFileInline("javascript/base64.js");
<script type="text/javascript" src="/code-syntax-highlighter/shBrushPhp.js"></script>
<script type="text/javascript" src="/code-syntax-highlighter/shBrushXml.js"></script>
<script type="text/javascript">
+//<![CDATA[
jQuery(window).load(
function() {
jQuery("#fbTarget").focus();
@@ -234,6 +245,7 @@ outputJavaScriptFileInline("javascript/base64.js");
}
);
<?php endif; ?>
+//]]>
</script>
<?php include("fend.inc"); ?>
OpenPOWER on IntegriCloud