Diff for /loncom/interface/lonfeedback.pm between versions 1.99.2.1 and 1.99.2.2

version 1.99.2.1, 2004/07/23 20:01:46 version 1.99.2.2, 2004/07/27 14:29:03
Line 552  sub mail_screen { Line 552  sub mail_screen {
   }    }
   my $latexHelp=&Apache::loncommon::helpLatexCheatsheet();    my $latexHelp=&Apache::loncommon::helpLatexCheatsheet();
   my $htmlheader=&Apache::lonhtmlcommon::htmlareaheaders();    my $htmlheader=&Apache::lonhtmlcommon::htmlareaheaders();
   my $onsubmit='';  
   if ((&Apache::lonhtmlcommon::htmlareabrowser()) &&  
       (!&Apache::lonhtmlcommon::htmlareablocked())) {  
       $onsubmit='document.mailform.onsubmit();';  
   }  
   my $send=&mt('Send');    my $send=&mt('Send');
   $r->print(<<ENDDOCUMENT);    $r->print(<<ENDDOCUMENT);
 <html>  <html>
Line 600  $htmlheader Line 595  $htmlheader
         }          }
   
         if (rec) {          if (rec) {
             $onsubmit              if (typeof(document.mailform.onsubmit)!='undefined') {
    document.mailform.onsubmit();
       }
     document.mailform.submit();      document.mailform.submit();
         } else {          } else {
             alert('Please check a feedback type.');              alert('Please check a feedback type.');
Line 635  Attachment (128 KB max size): <input typ Line 632  Attachment (128 KB max size): <input typ
 </p>  </p>
 </form>  </form>
 ENDDOCUMENT  ENDDOCUMENT
 $r->print(&generate_preview_button($onsubmit).  $r->print(&generate_preview_button().
 &Apache::lonhtmlcommon::htmlareaselectactive('comment').  &Apache::lonhtmlcommon::htmlareaselectactive('comment').
 '</body></html>');  '</body></html>');
 }  }
Line 1114  sub show_preview { Line 1111  sub show_preview {
 }  }
   
 sub generate_preview_button {  sub generate_preview_button {
     my ($onsubmit)=@_;  
     my $pre=&mt("Show Preview");      my $pre=&mt("Show Preview");
     return(<<ENDPREVIEW);      return(<<ENDPREVIEW);
 <form name="preview" action="/adm/feedback?preview=1" method="post" target="preview">  <form name="preview" action="/adm/feedback?preview=1" method="post" target="preview">
 <input type="hidden" name="subject">  <input type="hidden" name="subject">
 <input type="hidden" name="comment" />  <input type="hidden" name="comment" />
 <input type="button" value="$pre"  <input type="button" value="$pre"
 onClick="$onsubmit;this.form.comment.value=document.mailform.comment.value;this.form.subject.value=document.mailform.subject.value;this.form.submit();" />  onClick="if (typeof(document.mailform.onsubmit)!='undefined') {document.mailform.onsubmit();};this.form.comment.value=document.mailform.comment.value;this.form.subject.value=document.mailform.subject.value;this.form.submit();" />
 </form>  </form>
 ENDPREVIEW  ENDPREVIEW
 }  }

Removed from v.1.99.2.1  
changed lines
  Added in v.1.99.2.2


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>