[LON-CAPA-cvs] cvs: loncom /interface lonfeedback.pm

albertel lon-capa-cvs@mail.lon-capa.org
Fri, 23 Jul 2004 19:58:40 -0000


albertel		Fri Jul 23 15:58:40 2004 EDT

  Modified files:              
    /loncom/interface	lonfeedback.pm 
  Log:
   BUG#3232
  
  
Index: loncom/interface/lonfeedback.pm
diff -u loncom/interface/lonfeedback.pm:1.103 loncom/interface/lonfeedback.pm:1.104
--- loncom/interface/lonfeedback.pm:1.103	Fri Jul 23 12:56:29 2004
+++ loncom/interface/lonfeedback.pm	Fri Jul 23 15:58:40 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Feedback
 #
-# $Id: lonfeedback.pm,v 1.103 2004/07/23 16:56:29 albertel Exp $
+# $Id: lonfeedback.pm,v 1.104 2004/07/23 19:58:40 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -959,7 +959,7 @@
 </p>
 </form>
 ENDDOCUMENT
-$r->print(&generate_preview_button().
+$r->print(&generate_preview_button($onsubmit).
 &Apache::lonhtmlcommon::htmlareaselectactive('comment').
 '</body></html>');
 }
@@ -1758,13 +1758,14 @@
 }
 
 sub generate_preview_button {
+    my ($onsubmit)=@_;
     my $pre=&mt("Show Preview");
     return(<<ENDPREVIEW);
 <form name="preview" action="/adm/feedback?preview=1" method="post" target="preview">
 <input type="hidden" name="subject">
 <input type="hidden" name="comment" />
 <input type="button" value="$pre"
-onClick="document.mailform.onsubmit();this.form.comment.value=document.mailform.comment.value;this.form.subject.value=document.mailform.subject.value;this.form.submit();" />
+onClick="$onsubmit;this.form.comment.value=document.mailform.comment.value;this.form.subject.value=document.mailform.subject.value;this.form.submit();" />
 </form>
 ENDPREVIEW
 }