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

albertel lon-capa-cvs@mail.lon-capa.org
Fri, 23 Jul 2004 20:01:46 -0000


albertel		Fri Jul 23 16:01:46 2004 EDT

  Modified files:              (Branch: version_1_2_X)
    /loncom/interface	lonfeedback.pm 
  Log:
  - backport 1.104
  
  
Index: loncom/interface/lonfeedback.pm
diff -u loncom/interface/lonfeedback.pm:1.99 loncom/interface/lonfeedback.pm:1.99.2.1
--- loncom/interface/lonfeedback.pm:1.99	Fri Jul  9 19:05:52 2004
+++ loncom/interface/lonfeedback.pm	Fri Jul 23 16:01:46 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Feedback
 #
-# $Id: lonfeedback.pm,v 1.99 2004/07/09 23:05:52 raeburn Exp $
+# $Id: lonfeedback.pm,v 1.99.2.1 2004/07/23 20:01:46 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -635,7 +635,7 @@
 </p>
 </form>
 ENDDOCUMENT
-$r->print(&generate_preview_button().
+$r->print(&generate_preview_button($onsubmit).
 &Apache::lonhtmlcommon::htmlareaselectactive('comment').
 '</body></html>');
 }
@@ -1114,13 +1114,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
 }