--- loncom/interface/lonpreferences.pm 2009/04/25 20:22:07 1.154 +++ loncom/interface/lonpreferences.pm 2009/05/05 11:40:51 1.157 @@ -1,7 +1,7 @@ # The LearningOnline Network # Preferences # -# $Id: lonpreferences.pm,v 1.154 2009/04/25 20:22:07 www Exp $ +# $Id: lonpreferences.pm,v 1.157 2009/05/05 11:40:51 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1077,13 +1077,16 @@ sub colorschanger { # figure out colors my $function=&Apache::loncommon::get_users_function(); my $domain=&Apache::loncommon::determinedomain(); - my %colortypes=('pgbg' => 'Page Background', - 'tabbg' => 'Header Background', - 'sidebg'=> 'Header Border', - 'font' => 'Font', - 'link' => 'Un-Visited Link', - 'vlink' => 'Visited Link', - 'alink' => 'Active Link'); + my %colortypes=&Apache::lonlocal::texthash( + 'pgbg' => 'Page Background Color', + 'tabbg' => 'Header Background Color', + 'sidebg' => 'Header Border Color', + 'font' => 'Font Color', + 'fontmenu' => 'Font Menu Color', + 'link' => 'Un-Visited Link Color', + 'vlink' => 'Visited Link Color', + 'alink' => 'Active Link Color', + ); my $start_data_table = &Apache::loncommon::start_data_table(); my $chtable=''; foreach my $item (sort(keys(%colortypes))) { @@ -1094,14 +1097,14 @@ sub colorschanger { '" size="10" value="'.$curcol. '" />Select'. + .$item."','parmform.pres','psub'".');">'.&mt('Select').''. &Apache::loncommon::end_data_table_row()."\n"; } my $end_data_table = &Apache::loncommon::end_data_table(); my $pjump_def = &Apache::lonhtmlcommon::pjump_javascript_definition(); - my $save = &mt('Save'); - my $rstall = &mt('Reset All'); - my $resetdefault = &mt('Reset All Colors to Default'); + my $savebutton = &mt('Save'); + my $resetbutton = &mt('Reset All'); + my $resetbuttondesc = &mt('Reset All Colors to Default'); $r->print(< @@ -1140,8 +1143,10 @@ $start_data_table $chtable $end_data_table - - +

+ + +

ENDCOL } @@ -1151,13 +1156,16 @@ sub verify_and_change_colors { # figure out colors my $function=&Apache::loncommon::get_users_function(); my $domain=&Apache::loncommon::determinedomain(); - my %colortypes=('pgbg' => 'Page Background', - 'tabbg' => 'Header Background', - 'sidebg'=> 'Header Border', - 'font' => 'Font', - 'link' => 'Un-Visited Link', - 'vlink' => 'Visited Link', - 'alink' => 'Active Link'); + my %colortypes=&Apache::lonlocal::texthash( + 'pgbg' => 'Page Background Color', + 'tabbg' => 'Header Background Color', + 'sidebg' => 'Header Border Color', + 'font' => 'Font Color', + 'fontmenu' => 'Font Menu Color', + 'link' => 'Un-Visited Link Color', + 'vlink' => 'Visited Link Color', + 'alink' => 'Active Link Color', + ); my $message=''; foreach my $item (keys %colortypes) { @@ -1166,13 +1174,16 @@ sub verify_and_change_colors { if (($color=~/^\#[0-9A-Fa-f]{6}$/) && (!$env{'form.resetall'})) { &Apache::lonnet::put('environment',{$entry => $color}); &Apache::lonnet::appenv({'environment.'.$entry => $color}); - $message.=&Apache::lonhtmlcommon::confirm_success(&mt('Set '.$colortypes{$item}.' to ').'"'.$color.'"').'
'; + $message.=&Apache::lonhtmlcommon::confirm_success(&mt('Set [_1] to [_2]',''.$colortypes{$item}.'','"'.$color.'"')) + .'
'; } else { &Apache::lonnet::del('environment',[$entry]); &Apache::lonnet::delenv('environment.'.$entry); - $message.=&Apache::lonhtmlcommon::confirm_success(&mt('Reset '.$colortypes{$item}.'.')).'
'; + $message.=&Apache::lonhtmlcommon::confirm_success(&mt('Reset [_1]',''.$colortypes{$item}.'')) + .'
'; } } + my $now = time; &Apache::lonnet::put('environment',{'color.timestamp' => $now}); &Apache::lonnet::appenv({'environment.color.timestamp' => $now}); @@ -1206,7 +1217,9 @@ sub passwordchanger { $defdom = $r->dir_config('lonDefDomain'); my %data = &Apache::lonnet::tmpget($mailtoken); if (keys(%data) == 0) { - $r->print(&mt('Sorry, the URL you provided to complete the reset of your password was invalid. Either the token included in the URL has been deleted or the URL you provided was invalid. Please submit a new request for a password reset, and follow the link to the new URL included in the e-mail that will be sent to you, to allow you to enter a new password.')); + $r->print(&mt('Sorry, the URL you provided to complete the reset of your password was invalid. Either the token included in the URL has been deleted or the URL you provided was invalid. Please submit a [_1]new request[_2] for a password reset, and follow the link to the new URL included in the e-mail that will be sent to you, to allow you to enter a new password.' + ,'','') + ); return; } if (defined($data{time})) {