--- loncom/interface/lonsupportreq.pm 2011/03/03 00:33:38 1.65 +++ loncom/interface/lonsupportreq.pm 2011/03/03 17:29:29 1.66 @@ -1,5 +1,5 @@ # -# $Id: lonsupportreq.pm,v 1.65 2011/03/03 00:33:38 raeburn Exp $ +# $Id: lonsupportreq.pm,v 1.66 2011/03/03 17:29:29 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -558,7 +558,6 @@ sub print_request_receipt { sourceurl => 'URL', date => 'Date/Time', secn => 'Section', - asup => 'A support request has been sent to', warn => 'Warning: Problem with support e-mail address', your => 'Your support request contained the following information', sect => 'section', @@ -689,14 +688,20 @@ END $bad_email = 1; } } - if ($bad_email) { - $r->print(' -

'.$lt{'warn'}.'

'. -&mt('As the e-mail address provided for this LON-CAPA server ([_1]) does not appear to be a valid e-mail address, your support request has not been sent to the LON-CAPA support staff or administrator at your institution.',$to).' '.&mt('Instead a copy has been sent to the LON-CAPA support team at Michigan State University.')); - $to = 'helpdesk@lon-capa.org'; + + my $message; + if (!$bad_email) { + $message = &Apache::lonhtmlcommon::confirm_success( + &mt('A support request has been sent to [_1]',''.$to.'')); } else { - $r->print('

'.$lt{'asup'}.' '.$to.'

'); + $message = &Apache::lonhtmlcommon::confirm_success( + $lt{'warn'}.'
' + .&mt('As the e-mail address provided for this LON-CAPA server ([_1]) does not appear to be a valid e-mail address, your support request has [_2]not[_3] been sent to the LON-CAPA support staff or administrator at your institution.',''.$to.'','','') + .' '.&mt('Instead a copy has been sent to the LON-CAPA support team at Michigan State University.'),1); + $to = 'helpdesk@lon-capa.org'; } + $r->print(&Apache::loncommon::confirmwrapper($message)); + if (defined($env{'form.email'})) { $env{'form.email'} =~ s/^\s+//; $env{'form.email'} =~ s/\s+$//; @@ -744,7 +749,7 @@ END $fname = $1; $displaymsg .= '
' .&mt('An uploaded screenshot file [_1] ([_2] bytes) was included in the request sent by [_3].' - ,''.$fname.'' + ,''.$fname.'' ,$attachmentsize ,$env{'user.name'}.':'.$env{'user.domain'} );