--- loncom/interface/lonpreferences.pm 2009/04/05 17:18:29 1.150 +++ loncom/interface/lonpreferences.pm 2009/10/10 04:05:12 1.175 @@ -1,7 +1,7 @@ # The LearningOnline Network # Preferences # -# $Id: lonpreferences.pm,v 1.150 2009/04/05 17:18:29 droeschl Exp $ +# $Id: lonpreferences.pm,v 1.175 2009/10/10 04:05:12 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -42,6 +42,7 @@ use Apache::loncommon(); use Apache::lonhtmlcommon(); use Apache::lonlocal; use Apache::lonnet; +use LONCAPA::lonauthcgi(); use LONCAPA(); # @@ -135,9 +136,9 @@ sub verify_and_change_wysiwyg { my $newsetting=$env{'form.wysiwyg'}; &Apache::lonnet::put('environment',{'wysiwygeditor' => $newsetting}); &Apache::lonnet::appenv({'environment.wysiwygeditor' => $newsetting}); -# $r->print('
'.&mt('Setting WYSIWYG editor to:').' '.&mt($newsetting).'
'); - print_main_menu($r,''.&mt('Setting WYSIWYG editor to:').' ' - .&mt($newsetting).'
'); + my $message=&Apache::lonhtmlcommon::confirm_success(&mt('Set [_1] to [_2]',''.&mt('WYSIWYG Editor').'',''.&mt($newsetting).'')); + $message=&Apache::loncommon::confirmwrapper($message); + &print_main_menu($r,$message); } ################################################################ @@ -187,17 +188,15 @@ sub verify_and_change_languages { if ($newlanguage) { &Apache::lonnet::put('environment',{'languages' => $newlanguage}); &Apache::lonnet::appenv({'environment.languages' => $newlanguage}); - $message=&mt('Set new preferred languages to ').'"'.$newlanguage.'".'; + $message=&Apache::lonhtmlcommon::confirm_success(&mt('Set [_1] to [_2]',''.&mt('Preferred language').'','"'.$newlanguage.'".')); } else { &Apache::lonnet::del('environment',['languages']); &Apache::lonnet::delenv('environment.languages'); - $message=&mt('Reset preferred language.'); + $message=&Apache::lonhtmlcommon::confirm_success(&mt('Reset [_1]',''.&mt('Preferred language').'')); } + $message=&Apache::loncommon::confirmwrapper($message); &Apache::loncommon::flush_langs_cache($user,$domain); - print_main_menu($r, $message); -# $r->print(<' + .'