]> git.mjollnir.org Git - moodle.git/commitdiff
merged from 14_STABLE -
authorskodak <skodak>
Tue, 26 Oct 2004 19:57:18 +0000 (19:57 +0000)
committerskodak <skodak>
Tue, 26 Oct 2004 19:57:18 +0000 (19:57 +0000)
updated htmleditor invocation (from files/index.php)

mod/resource/coursefiles.php

index 41d2252ec1899a0fe20211349765d080d20fa8eb..42c98dbc1cebfbfdaac74cdaad2ffbb2b15074fd 100644 (file)
                 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\" />";
                 echo "</form>";
                 echo "</td></tr></table>";
 
-                if ($usehtmleditor) {
-                    print_richedit_javascript("form", "text", "yes");
+                if ($usehtmleditor) { 
+                    use_html_editor();
                 }