[LON-CAPA-cvs] cvs: loncom /interface lonfeedback.pm
www
lon-capa-cvs@mail.lon-capa.org
Sat, 12 Jun 2004 01:07:11 -0000
www Fri Jun 11 21:07:11 2004 EDT
Modified files:
/loncom/interface lonfeedback.pm
Log:
Bug #3082: submission of feedback in non-htmlarea mode
Index: loncom/interface/lonfeedback.pm
diff -u loncom/interface/lonfeedback.pm:1.93 loncom/interface/lonfeedback.pm:1.94
--- loncom/interface/lonfeedback.pm:1.93 Fri Jun 4 18:54:36 2004
+++ loncom/interface/lonfeedback.pm Fri Jun 11 21:07:10 2004
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Feedback
#
-# $Id: lonfeedback.pm,v 1.93 2004/06/04 22:54:36 albertel Exp $
+# $Id: lonfeedback.pm,v 1.94 2004/06/12 01:07:10 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -434,7 +434,7 @@
<font size="1">Note: in anonymous discussion, your name is visible only to
course faculty</font><br />
<b>Title:</b> <input type="text" name="subject" value="" size="30" /><br /><br />
-<textarea name="comment" cols="60" rows="12" wrap="hard"></textarea>
+<textarea name="comment" cols="80" rows="14" wrap="hard"></textarea>
<p>
Attachment (128 KB max size): <input type="file" name="attachment" />
</p>
@@ -483,6 +483,11 @@
}
my $latexHelp=&Apache::loncommon::helpLatexCheatsheet();
my $htmlheader=&Apache::lonhtmlcommon::htmlareaheaders();
+ my $onsubmit='';
+ if ((&Apache::lonhtmlcommon::htmlareabrowser()) &&
+ (!&Apache::lonhtmlcommon::htmlareablocked())) {
+ $onsubmit='document.mailform.onsubmit();';
+ }
my $send=&mt('Send');
$r->print(<<ENDDOCUMENT);
<html>
@@ -526,7 +531,7 @@
}
if (rec) {
- document.mailform.onsubmit();
+ $onsubmit
document.mailform.submit();
} else {
alert('Please check a feedback type.');
@@ -550,7 +555,7 @@
$latexHelp
Title: <input type="text" name="subject" size="30" value="$subject" /></p>
<p>
-<textarea name="comment" cols="60" rows="10" wrap="hard">
+<textarea name="comment" id="comment" cols="60" rows="10" wrap="hard">
</textarea></p>
<p>
Attachment (128 KB max size): <input type="file" name="attachment" />
@@ -562,7 +567,7 @@
</form>
ENDDOCUMENT
$r->print(&generate_preview_button().
-&Apache::lonhtmlcommon::htmlareaactive().
+&Apache::lonhtmlcommon::htmlareaselectactive('comment').
'</body></html>');
}