Permalink
Browse files

merged from 14_STABLE -

updated htmleditor invocation (from files/index.php)
  • Loading branch information...
1 parent 2f3b54a commit 453c406e314b608b2b01f9ae45f46cbab29d79ad skodak committed Oct 26, 2004
Showing with 4 additions and 9 deletions.
  1. +4 −9 mod/resource/coursefiles.php
@@ -312,21 +312,16 @@ function set_value(txt) {
fclose($fileptr);
if (mimeinfo("type", $file) == "text/html") {
- if ($usehtmleditor = can_use_richtext_editor()) {
- $onsubmit = "onsubmit=\"copyrichtext(document.form.text);\"";
- } else {
- $onsubmit = "";
- }
+ $usehtmleditor = can_use_html_editor();
} else {
$usehtmleditor = false;
- $onsubmit = "";
}
$usehtmleditor = false; // Always keep it off for now
print_heading("$streditfile");
echo "<table><tr><td colspan=\"2\">";
- echo "<form action=\"".$ME."\" method=\"post\" name=\"form\" $onsubmit>";
+ echo "<form action=\"".$ME."\" method=\"post\" name=\"form\">";
echo " <input type=\"hidden\" name=\"id\" value=\"$id\" />";
echo " <input type=\"hidden\" name=\"wdir\" value=\"$wdir\" />";
echo " <input type=\"hidden\" name=\"file\" value=\"$file\" />";
@@ -345,8 +340,8 @@ function set_value(txt) {
echo "</form>";
echo "</td></tr></table>";
- if ($usehtmleditor) {
- print_richedit_javascript("form", "text", "yes");
+ if ($usehtmleditor) {
+ use_html_editor();
}

0 comments on commit 453c406

Please sign in to comment.