Moved the object code out into a function print_textarea

This commit is contained in:
moodler
2002-10-12 07:23:16 +00:00
parent aed0b713fe
commit e1947876ec
3 changed files with 22 additions and 20 deletions
+19
View File
@@ -314,6 +314,25 @@ function print_editing_switch($courseid) {
}
}
function print_textarea($richedit, $rows, $cols, $width, $height, $name, $value="") {
global $CFG, $THEME;
if ($richedit) {
echo "<object id=richedit style=\"BACKGROUND-COLOR: buttonface\"";
echo " data=\"$CFG->wwwroot/lib/rte/richedit.html\"";
echo " width=\"$width\" height=\"$height\" ";
echo " type=\"text/x-scriptlet\" VIEWASTEXT></object>";
echo "<TEXTAREA style=\"display:none\" NAME=\"$name\" ROWS=1 COLS=1>";
p($value);
echo "</TEXTAREA>";
} else {
echo "<TEXTAREA name=\"$name\" rows=\"$rows\" cols=\"$cols\" wrap=virtual>";
p($value);
echo "</TEXTAREA>";
}
}
function update_course_icon($courseid) {
global $CFG, $USER;