]> git.mjollnir.org Git - moodle.git/commitdiff
Undoing my changes to the editing functions, because it removed backward
authormoodler <moodler>
Tue, 11 Nov 2003 06:27:49 +0000 (06:27 +0000)
committermoodler <moodler>
Tue, 11 Nov 2003 06:27:49 +0000 (06:27 +0000)
compatibility with 1.1.1 ... this way it works on both.

mod/glossary/edit.html
mod/glossary/edit.php

index 883e50c723f0560b45ad2d78b12c7bb63bf03230..aafc2679cff94802fb718d1bdeb28d07971a50fa 100644 (file)
@@ -2,7 +2,7 @@
     global $CFG;
 ?>
 <center>
-<form name="form" method="post"  action="edit.php" enctype="multipart/form-data">
+<form name="form" method="post" <?=$onsubmit ?> action="edit.php" enctype="multipart/form-data">
 <table  class=generalbox cellpadding=5 bgcolor="<?php p($THEME->cellheading)?>">
 <?PHP
 if (isset($errors)) {
@@ -181,7 +181,7 @@ if (isset($errors)) {
 
 <?PHP 
    if ($usehtmleditor) { 
-       use_html_editor("text");
+       print_richedit_javascript("form", "text", "yes");
    }
 ?>
 
index 63db0a7905076f79ec4569a30a58964bcc86c01b..b59d71e84573e26be3269504ba6f980522acd7e3 100644 (file)
@@ -195,10 +195,12 @@ $strglossary = get_string("modulename", "glossary");
 $strglossaries = get_string("modulenameplural", "glossary");
 $stredit = get_string("edit");
 
-if ($usehtmleditor = can_use_html_editor()) {
+if ($usehtmleditor = can_use_richtext_editor()) {
     $defaultformat = FORMAT_HTML;
+    $onsubmit = "onsubmit=\"copyrichtext(form.text);\"";
 } else {
     $defaultformat = FORMAT_MOODLE;
+    $onsubmit = "";
 }
 
 print_header(strip_tags("$course->shortname: $glossary->name"), "$course->fullname",