'.
+ .$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(<
@@ -1158,8 +1143,10 @@ $start_data_table
$chtable
$end_data_table
-
-
+
+
+
+
ENDCOL
}
@@ -1169,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) {
@@ -1184,24 +1174,21 @@ 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.=&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.=&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});
- print_main_menu($r, $message);
-# $r->print(<
-#
-#
-#ENDVCCOL
+ &print_main_menu($r, $message);
}
######################################################
@@ -1213,7 +1200,7 @@ sub passwordchanger {
# Passwords are encrypted using londes.js (DES encryption)
$errormessage = ($errormessage || '');
my ($user,$domain,$currentpass,$defdom);
- Apache::lonhtmlcommon::add_breadcrumb(
+ &Apache::lonhtmlcommon::add_breadcrumb(
{ href => '/adm/preferences?action=changepass',
text => 'Change Password'});
unless ($caller eq 'reset_by_email') {
@@ -1230,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})) {
@@ -1555,21 +1544,19 @@ ENDERROR
# Inform the user the password has (not?) been changed
my $message;
if ($result =~ /^ok$/) {
- $message = &mt('The password for [_1] was successfully changed.',$user);
+ $message = &Apache::lonhtmlcommon::confirm_success(&mt('The password for [_1] was successfully changed.',$user));
if ($caller eq 'reset_by_email') {
$r->print($message.' ');
} else {
&print_main_menu($r, $message);
}
-# $r->print("
".&mt('The password for [_1] was successfully changed',$user)."
");
} else {
# error error: run in circles, scream and shout
- $message = &mt("The password for [_1] was not changed.",$user).' '.&mt('Please make sure your old password was entered correctly.');
+ $message = &Apache::lonhtmlcommon::confirm_success(
+ &mt("The password for [_1] was not changed.",$user).' '.&mt('Please make sure your old password was entered correctly.'),1);
unless ($caller eq 'reset_by_email') {
&print_main_menu($r, $message);
}
-# $r->print("
".&mt("The password for [_1] was not changed",$user)."
".
-# &mt('Please make sure your old password was entered correctly.'));
return 1;
}
return;
@@ -1699,19 +1686,16 @@ sub verify_and_change_discussion {
if (defined($env{'form.discmark'}) ) {
my $newmark = $env{'form.newmark'};
if ($newmark eq 'ondisp') {
- $message.=&mt('In discussions: new posts will be cease to be identified as "NEW" after display.').' ';
+ $message.=&Apache::lonhtmlcommon::confirm_success(&mt('In discussions: new posts will be cease to be identified as "NEW" after display.')).' ';
&Apache::lonnet::put('environment',{'discmarkread' => $newmark});
&Apache::lonnet::appenv({'environment.discmarkread' => $newmark});
} else {
- $message.=&mt('In discussions: posts will be identified as "NEW" until marked as read by the reader.').' ';
+ $message.=&Apache::lonhtmlcommon::confirm_success(&mt('In discussions: posts will be identified as "NEW" until marked as read by the reader.')).' ';
&Apache::lonnet::del('environment',['discmarkread']);
&Apache::lonnet::delenv('environment.discmarkread');
}
}
-# $r->print(< '/adm/preferences?action=changecourseinit',
text => 'Change Course Init. Pref.'});
$r->print(Apache::loncommon::start_page('Change Course Initialization Preference'));
@@ -1798,11 +1782,7 @@ sub verify_and_change_coursepage {
$refpage.'">'.$lt{'dasp'}.'';
}
}
-# $r->print(<
-#ENDVCSCREEN
- print_main_menu($r, $message);
+ &print_main_menu($r, &Apache::lonhtmlcommon::confirm_success($message));
}
sub print_main_menu {
@@ -1891,7 +1871,7 @@ my @menu=
},
{ categorytitle=>'Message Management',
items =>[
- { linktext => 'Messages & Notifications',
+ { linktext => 'Messages & Notifications',
url => '/adm/preferences?action=changemsgforward',
permission => 'F',
#help => 'Prefs_Messages',
@@ -1909,7 +1889,7 @@ my @menu=
},
{ categorytitle=>'Other',
items =>[
- { linktext => 'Register Response Devices ("Clickers")',
+ { linktext => 'Register Response Devices ("Clickers")',
url => '/adm/preferences?action=changeclicker',
permission => 'F',
#help => '',
@@ -2075,8 +2055,8 @@ sub handler {
}elsif($env{'form.action'} eq 'verify_and_change_coursepage'){
&verify_and_change_coursepage($r);
}elsif($env{'form.action'} eq 'debugtoggle'){
- toggle_debug();
- print_main_menu($r);
+ &toggle_debug();
+ &print_main_menu($r);
}
return OK;
@@ -2357,7 +2337,8 @@ sub handler2 {
}));
}
- if ($env{'user.name'} =~ /^(albertel|fox|foxr|kortemey|korte|raeburn)$/) {
+ if (($env{'user.name'} =~ /^(albertel|fox|foxr|kortemey|korte|raeburn)$/)
+ && ($env{'user.domain'} =~/^(msu|gerd)$/)){
push (@Options,({ action => 'debugtoggle',
printmenu => 'yes',
subroutine => \&toggle_debug,