]> git.mjollnir.org Git - moodle.git/commitdiff
HTML editor (format popup) display wrong in glossary comments
authorstronk7 <stronk7>
Sat, 28 Aug 2004 19:48:56 +0000 (19:48 +0000)
committerstronk7 <stronk7>
Sat, 28 Aug 2004 19:48:56 +0000 (19:48 +0000)
Bug 1826
(http://moodle.org/bugs/bug.php?op=show&bugid=1826)

Merged from MOODLE_14_STABLE

mod/glossary/comment.html

index 61cae6900adad39efcf5f0ef749ca233fa17ad03..6025e9dc7c36a29aba942626fac38a956a025f7f 100644 (file)
@@ -1,36 +1,46 @@
-<FORM name="theform" method="post" action="comment.php">
+<FORM name="form" method="post" action="comment.php">
 <table  class=generalbox cellpadding=5 bgcolor="<?php p($THEME->cellheading)?>">
 <tr valign=top>
-    <td align=right><p><b><?php echo get_string("comment","glossary") ?>:</b></p>
-    <font size="1">
+    <td align=right><p><b>
+      <?php echo get_string("comment","glossary") ?>:
+      </b></p></td>
+    <td align="left" rowspan="2">
+    <?php print_textarea($usehtmleditor, 25, 65, 630, 400, "text", $form->text); ?>
+    </td>
+</tr>
+<tr valign="top">
+    <td align="right" valign="center" nowrap>
+    
+    <font SIZE="1">
      <?php
         helpbutton("writing", get_string("helpwriting"), "moodle", true, true);
         echo "<br />";
         if ($usehtmleditor) {
            helpbutton("richtext", get_string("helprichtext"), "moodle", true, true);
         } else {
-           emoticonhelpbutton("form", "comment");
-        } 
+           emoticonhelpbutton("form", "text");
+        }
       ?>
-      <br />
-    </font>
+     <br />
+     </font>
+
     </td>
+</tr>
+<tr valign=top>
+    <td align=right><p><b><?php print_string("formattexttype"); ?>:</b></p></td>
     <td>
     <?php
-       print_textarea($usehtmleditor, 20, 60, 680, 400, "text", $form->text);
-    
-       echo "<p align=right>";
-          helpbutton("textformat", get_string("helpformatting"));
-       print_string("formattexttype");
-       echo ":&nbsp;";
-       if (!isset($form->format)) {
-           if (!$form->format) {
-               $form->format = $defaultformat;
-           }
-       }
-       choose_from_menu(format_text_menu(), "format", $form->format, ""); 
-       echo "</p>";
-    ?>
+        if ($usehtmleditor) {   /// Trying this out for a while
+            print_string('formathtml');
+            echo '<input type="hidden" name="format" value="'.FORMAT_HTML.'">';
+        } else {
+            if (!isset($form->format)) {
+                $form->format = $defaultformat;
+            }
+            choose_from_menu(format_text_menu(), "format", $form->format, "");
+        }
+        helpbutton("textformat", get_string("helpformatting"));
+     ?>
     </td>
 </tr>
 <tr>