mirror of
https://github.com/moodle/moodle.git
synced 2025-05-04 07:08:51 +02:00
Better default options, and hiding of moodle-text help when htmlediting is operational
This commit is contained in:
parent
c4a4cae062
commit
213e8cc67d
@ -10,7 +10,11 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign=top>
|
||||
<td align=right><P><B><? print_string("message", "forum"); ?>:</B><BR><BR><? helpbutton("text", get_string("helptext")) ?></P></TD>
|
||||
<td align=right><P><B><? print_string("message", "forum"); ?>:</B>
|
||||
<? if (!$usehtmleditor) { ?>
|
||||
<BR><BR><? helpbutton("text", get_string("helptext")) ?></P>
|
||||
<? } ?>
|
||||
</TD>
|
||||
<td>
|
||||
<? if ($usehtmleditor) { ?>
|
||||
<object id="richedit" style="BACKGROUND-COLOR: buttonface" data="../../lib/rte/richedit.html"
|
||||
|
@ -63,6 +63,12 @@
|
||||
die;
|
||||
}
|
||||
|
||||
if ($usehtmleditor = can_use_richtext_editor()) {
|
||||
$defaultformat = FORMAT_HTML;
|
||||
$onsubmit = "onsubmit=\"copyrichtext(theform.message);\"";
|
||||
} else {
|
||||
$defaultformat = FORMAT_MOODLE;
|
||||
}
|
||||
|
||||
|
||||
if (isset($forum)) { // User is starting a new discussion in a forum
|
||||
@ -90,6 +96,7 @@
|
||||
$post->subject = "";
|
||||
$post->user = $USER->id;
|
||||
$post->message = "";
|
||||
$post->format = $defaultformat;
|
||||
|
||||
forum_set_return();
|
||||
|
||||
@ -116,6 +123,7 @@
|
||||
$post->subject = $parent->subject;
|
||||
$post->user = $USER->id;
|
||||
$post->message = "";
|
||||
$post->format = $defaultformat;
|
||||
|
||||
$strre = get_string("re", "forum");
|
||||
if (!(substr($post->subject, 0, 3) == $strre)) {
|
||||
@ -262,9 +270,6 @@
|
||||
|
||||
$strforums = get_string("modulenameplural", "forum");
|
||||
|
||||
if ($usehtmleditor = can_use_richtext_editor()) {
|
||||
$onsubmit = "onsubmit=\"copyrichtext(theform.message);\"";
|
||||
}
|
||||
|
||||
$navmiddle = "<A HREF=\"../forum/index.php?id=$course->id\">$strforums</A> -> <A HREF=\"view.php?f=$forum->id\">$forum->name</A>";
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user