-
-
-
+
- '.$lt{'fold'}.' '."\n".
+ | '.$lt{'fold'}.' '."\n".
&Apache::loncommon::select_form($folder,'folder',%formhash).'
|
- '.$lt{'show'}.' '."\n".
+ | '.$lt{'show'}.' '."\n".
&Apache::loncommon::select_form($env{'form.interdis'},'interdis',
%show).'
|
- '.$lt{'status'}.' '."\n".
+ | '.$lt{'status'}.' '."\n".
&Apache::loncommon::select_form($msgstatus,'msgstatus',%statushash).'
|
- '.$lt{'actn'}.' '.
- &Apache::loncommon::select_form('view','folderaction',%actions).'
- | '.
- '
+ | '.$lt{'actn'}.' '."\n".'
+ '.
+ &Apache::loncommon::select_form('view','folderaction',%actions).
+ '
+
+ |
+ '.&mt('New Folder').' '."\n".'
+
+
+
+
|
- | | | |
-
-
- |
-
- '."\n".
+'."\n".
''.
''.
($folder=~/^critical/?'':'');
@@ -268,12 +268,13 @@ sub get_permanent_folders {
}
sub get_msgstatus_types {
- my %statushash = &Apache::lonlocal::texthash(
- '' => 'Any',
- new => 'Unread',
- read => 'Read',
- replied => 'Replied to',
- forwarded => 'Forwarded',
+ # Don't translate here!
+ my %statushash = (
+ '' => 'Any',
+ 'new' => 'Unread',
+ 'read' => 'Read',
+ 'replied' => 'Replied to',
+ 'forwarded' => 'Forwarded',
);
return %statushash;
}
@@ -286,18 +287,31 @@ sub scrollbuttons {
my %statushash = &get_msgstatus_types();
my $status;
if ($msgstatus eq '') {
- $status = &mt('All');
+ $status = 'All'; # Don't translate here!
} else {
$status = $statushash{$msgstatus};
}
- return
- ''.&mt('Page').': '.
- ''.
- ''.
- ' of '.$maxdis.
- ''.
- ' '.
- &mt('[_1] messages: showing messages [_2] through [_3] of [_4].',$status,$first,$finish,$total).'';
+ my $output = ''.&mt('Page:').' ';
+ if ($maxdis == 1) {
+ # No buttons if only one page is displayed
+ $output .= '1/1';
+ } else {
+ $output .=
+ ''.
+ ''.
+ ' / '.$maxdis.' '.
+ ''.
+ '';
+ }
+ $output .=
+ ''
+ .''.&mt($status.' messages:').' '
+ .&mt('showing messages [_1] through [_2] of [_3].',
+ $first,$finish,$total)
+ .' '
+ .'';
+
+ return $output;
}
# =============================================================== Status Change
@@ -353,7 +367,7 @@ sub makefolder {
}
} else {
$outcome =
- &mt('Error - could not obtain lock on e-mail folders record.');
+ &mt('Error - could not obtain lock on message folders record.');
}
return ($outcome,$warning);
}
@@ -364,7 +378,7 @@ sub deletefolder {
my ($folder)=@_;
my %permfolders = &get_permanent_folders();
if (defined($permfolders{$folder})) {
- return &mt('The folder "[_1]" may not be deleted',$folder);
+ return &mt('The folder "[_1]" may not be deleted.',$folder);
}
my %userfolders = &Apache::lonmsg::get_user_folders();
if (!defined($userfolders{$folder})) {
@@ -504,6 +518,7 @@ sub movemsg {
sub discourse {
my ($statushash) = @_;
my ($result,$active,$previous,$future);
+ my $crstype = &Apache::loncommon::course_type();
my ($course_personnel,
$current_members,
$expired_members,
@@ -519,7 +534,16 @@ sub discourse {
\%defaultUsers,
1,"selectedusers",1,'email')
) {
- $result .= ' | '.
''.$$memberinfo{$user}{'uname'}.' | '.
''.$$memberinfo{$user}{'udom'}.' | '.
- &Apache::loncommon::end_data_table_row();
+ &Apache::loncommon::end_data_table_row());
}
}
- $result .= &Apache::loncommon::end_data_table().'
';
+ $r->print(&Apache::loncommon::end_data_table().''.
+ '
');
}
}
}
+ unless($env{'environment.wysiwygeditor'} eq 'on') {
+ $r->print('');
+ }
}
- return $result;
+ return $hasfloat;
}
sub group_check_uncheck {
my $output = qq|
|;
}
@@ -706,10 +759,16 @@ sub groupmail_header {
}
&Apache::lonhtmlcommon::clear_breadcrumbs();
if ($refarg) {
+ my $brtitle;
+ if (&Apache::loncommon::course_type() eq 'Community') {
+ $brtitle = 'View community groups';
+ } else {
+ $brtitle = 'View course groups';
+ }
&Apache::lonhtmlcommon::add_breadcrumb
({href=>"/adm/coursegroups",
text=>"Groups",
- title=>"View course groups"});
+ title=>$brtitle});
}
&Apache::lonhtmlcommon::add_breadcrumb
({href=>"/adm/$cdom/$cnum/$group/smppg?$refarg",
@@ -752,7 +811,7 @@ sub discrit {
.''
.&mt('Access to other pages will be prevented until you have moved all critical messages to your inbox.')
.'
'
- .'
END
foreach my $record (sort(keys(%{$records}))) {
@@ -2126,7 +2252,7 @@ END
$setuname,$setudom);
$r->print(&Apache::loncommon::start_data_table_row());
$r->print(<<"END");
- $ltext->{'star'}: $startform $ltext->{'endd'}: $endform |
+ $ltext->{'star'}: $startform $ltext->{'endd'}: $endform |
$settername |
|
@@ -2134,13 +2260,18 @@ END
foreach my $block (@{$typeorder}) {
my $blockstatus = '';
if ($blocks->{$block} eq 'on') {
- $blockstatus = 'checked="true"';
+ $blockstatus = 'checked="checked"';
}
- $r->print(' ');
+ $r->print(' ');
}
$r->print(<<"END");
|
-
+ |
+
END
$r->print(&Apache::loncommon::end_data_table_row());
$parmcount++;
@@ -2177,7 +2308,7 @@ END
| $ltext->{'dura'} |
$ltext->{'even'} $lt{'exam'} |
$ltext->{'blck'} |
- $ltext->{'actn'}? |
+ $ltext->{'actn'} |
END
$r->print(&Apache::loncommon::start_data_table_row());
@@ -2187,11 +2318,13 @@ END
END
foreach my $block (@{$typeorder}) {
- $r->print(' ');
+ $r->print(' ');
}
$r->print(<<"END");
- |
- |
+
+ |
END
$r->print(&Apache::loncommon::end_data_table_row());
$r->print(&Apache::loncommon::end_data_table());
@@ -2201,7 +2334,7 @@ END
sub blocktype_text {
my %types = &Apache::lonlocal::texthash(
'com' => 'Messaging',
- 'chat' => 'Chat',
+ 'chat' => 'Chat Room',
'boards' => 'Discussion',
'port' => 'Portfolio',
'groups' => 'Groups',
@@ -2226,8 +2359,10 @@ sub displaymessage {
my @messages=&sortedmessages(\%blocked,$startblock,$endblock,\$numblocked,$folder,$msgstatus);
if ( $blocked{$msgid} eq 'ON' ) {
&printheader($r,'/adm/email',&mt('Display a Message'));
- $r->print(&mt('You attempted to display a message that is currently blocked because you are enrolled in one or more courses for which there is an ongoing online exam.'));
- &build_block_table($r,$startblock,$endblock,\%setters);
+ #$r->print(&mt('You attempted to display a message that is currently blocked because you are enrolled in one or more courses for which there is an ongoing online exam.'));
+ #&build_block_table($r,$startblock,$endblock,\%setters);
+ my($blocked, $blocktext) = &Apache::loncommon::blocking_status("com");
+ $r->print("
".$blocktext);
return;
}
if ($msgstatus eq '') {
@@ -2264,63 +2399,35 @@ sub displaymessage {
&printheader($r,'/adm/email?display='.&escape($msgid),'Display a Message','',$content{'baseurl'});
my %courseinfo=&Apache::lonnet::coursedescription($content{'courseid'});
-# Functions and Actions
- my $li_start='• ';
- my $li_end=' ';
-
# Prepare available functions
- my $functionlist='';
+ my @functionlist;
if (!$content{'noreplies'}) {
- $functionlist.=$li_start
- .''
+ push(@functionlist,''
.&mt('Reply')
- .''
- .$li_end;
+ .'');
}
- $functionlist.=$li_start
- .''
+ push(@functionlist,''
.&mt('Forward')
- .''
- .$li_end;
- $functionlist.=$li_start
- .''
+ .'');
+ push(@functionlist,''
.&mt('Mark Unread')
- .''
- .$li_end;
- $functionlist.=$li_start
- .''
+ .'');
+ push(@functionlist,''
.&mt('Delete')
- .''
- .$li_end;
- $functionlist.=$li_start
- .''
+ .'');
+ push(@functionlist,''
.&mt('Back to Folder Display')
- .''
- .$li_end;
+ .'');
if ($counter > 0){
- $functionlist.=$li_start
- .''
- .&mt('Previous')
- .''
- .$li_end;
+ push(@functionlist,''
+ .&mt('Previous')
+ .'');
}
if ($counter < $number_of_messages - 1){
- $functionlist.=$li_start
- .''
- .&mt('Next')
- .''
- .$li_end;
- }
-# Print functions
- $r->print(''
- .'
'
- .''
- );
+ push(@functionlist,''
+ .&mt('Next')
+ .'');
+ }
# Prepare available actions
my $symb;
@@ -2329,42 +2436,58 @@ sub displaymessage {
} elsif (defined($content{'baseurl'})) {
$symb=&Apache::lonnet::symbread($content{'baseurl'});
}
+ my @actionlist;
if ($env{'user.adv'}) {
- my $actionlist='';
if (&Apache::lonnet::allowed('vgr',$env{'request.course.id'})) {
- $actionlist.=$li_start
- .&Apache::loncommon::track_student_link(
- &mt('View recent activity'),$content{'sendername'},$content{'senderdomain'},'check')
- .$li_end;
+ push(@actionlist,&Apache::loncommon::track_student_link(
+ &mt('View recent activity')
+ ,$content{'sendername'}
+ ,$content{'senderdomain'}
+ ,'check'));
}
if (&Apache::lonnet::allowed('opa',$env{'request.course.id'}) && $symb) {
- $actionlist.=$li_start
- .&Apache::loncommon::pprmlink(
- &mt('Set/Change parameters'),$content{'sendername'},$content{'senderdomain'},$symb,'check')
- .$li_end;
+ push(@actionlist,&Apache::loncommon::pprmlink(
+ &mt('Set/Change parameters')
+ ,$content{'sendername'}
+ ,$content{'senderdomain'}
+ ,$symb
+ ,'check'));
}
if (&Apache::lonnet::allowed('mgr',$env{'request.course.id'}) && $symb) {
- $actionlist.=$li_start
- .&Apache::loncommon::pgrdlink(
- &mt('Set/Change grades'),$content{'sendername'},$content{'senderdomain'},$symb,'check')
- .$li_end;
- }
-
-# Print actions
- if ($actionlist) {
- $r->print(''
- .'
'
- .''
- );
- }
+ push(@actionlist,&Apache::loncommon::pgrdlink(
+ &mt('Set/Change grades')
+ ,$content{'sendername'}
+ ,$content{'senderdomain'}
+ ,$symb
+ ,'check'));
+ }
}
+# Print functionlist and actionlist in page header
+ my $functions='';
+
+ # Functionlist
+ $functions.=&Apache::lonhtmlcommon::start_funclist();
+ foreach my $item (@functionlist) {
+ $functions.=&Apache::lonhtmlcommon::add_item_funclist($item);
+ }
+ $functions .= &Apache::lonhtmlcommon::end_funclist();
+
+ # Actionlist
+ if (@actionlist) {
+ my $legendtext=&mt('Currently available actions (will open extra window)');
+ $functions.=&Apache::lonhtmlcommon::start_funclist($legendtext);
+ foreach my $item (@actionlist) {
+ $functions.=&Apache::lonhtmlcommon::add_item_funclist($item);
+ }
+ $functions.=&Apache::lonhtmlcommon::end_funclist();
+ }
+
+ $functions.='
';
+ $r->print(&Apache::loncommon::head_subbox($functions));
+
+
my ($tonum,$tolist,$cclist,$bcclist,$groupcclist,%recipients);
if ($content{'recipid'}) {
$tonum = &retrieve_recips('display',\%content,\%recipients);
@@ -2378,7 +2501,16 @@ sub displaymessage {
$bcclist = join(', ',@{$recipients{'bcc'}});
}
}
- if (!$tolist && ref($content{'recuser'}) eq 'ARRAY') {
+
+ my $broadcast_link;
+ if (($content{'courseid'}) && ($content{'recipid'} &&
+ (ref($recipients{'course_broadcast'}) eq 'ARRAY') ||
+ (ref($recipients{'group_cc_broadcast'}) eq 'ARRAY') ||
+ (ref($recipients{'group_bcc_broadcast'}) eq 'ARRAY'))) {
+ $broadcast_link = &recipients_link($r,\%content,\%recipients);
+ }
+
+ if (((!$tolist) && (!$broadcast_link)) && ref($content{'recuser'}) eq 'ARRAY') {
my @recipients;
for (my $i=0; $i<@{$content{'recuser'}}; $i++) {
$recipients[$i] = &Apache::loncommon::aboutmewrapper(
@@ -2400,21 +2532,14 @@ sub displaymessage {
if (defined($content{'baseurl'})) {
$baseurl = &Apache::lonenc::check_encrypt($content{'baseurl'});
}
+ $r->print(''
.&Apache::lonhtmlcommon::start_pick_box()
.&Apache::lonhtmlcommon::row_title(&mt('Subject'))
.$content{'subject'}
@@ -2422,10 +2547,12 @@ sub displaymessage {
);
if ($folder eq 'sent') {
# To
- $r->print(&Apache::lonhtmlcommon::row_title(&mt('To'))
- .$tolist
- .&Apache::lonhtmlcommon::row_closure()
- );
+ if ($tolist) {
+ $r->print(&Apache::lonhtmlcommon::row_title(&mt('To'))
+ .$tolist
+ .&Apache::lonhtmlcommon::row_closure()
+ );
+ }
if ($cclist) {
$r->print(&Apache::lonhtmlcommon::row_title(&mt('Cc'))
.$cclist
@@ -2679,13 +2806,13 @@ sub recipients_link {
$nothing=&Apache::lonhtmlcommon::javascript_nothing();
$height = 400;
$width = 600;
- my $start_page =
- &Apache::loncommon::start_page('Broadcast List', undef,
- {only_body => 1,
- js_ready => 1,});
- my $end_page = &Apache::loncommon::end_page({js_ready => 1,});
- my $body = ''.&mt("Recipients of broadcast message").'
'.
- &Apache::loncommon::start_data_table();
+ $start_page =
+ &Apache::loncommon::start_page('Broadcast List', undef,
+ {only_body => 1,
+ js_ready => 1,});
+ $end_page = &Apache::loncommon::end_page({js_ready => 1,});
+ $body = ''.&mt("Recipients of broadcast message").'
'.
+ &Apache::loncommon::start_data_table();
my $cell = 0;
$body .= &Apache::loncommon::start_data_table_row();
foreach my $item (@{$recipients->{$show.'_broadcast'}}) {
@@ -2706,6 +2833,7 @@ sub recipients_link {
$body =~ s{\n}{}g;
$r->print(<
+//
ENDJS
@@ -2782,15 +2910,14 @@ sub displayresource {
sub header {
my ($r,$title,$baseurl)=@_;
-
my $extra = &Apache::loncommon::studentbrowser_javascript();
if ($baseurl) {
$extra .= "";
}
- $r->print(&Apache::loncommon::start_page('Communication and Messages',
+ $r->print(&Apache::loncommon::start_page('Messages',
$extra));
$r->print(&Apache::lonhtmlcommon::breadcrumbs
- (($title?$title:'Communication and Messages')));
+ (($title?$title:'Send and display messages')));
}
# ---------------------------------------------------------------- Print header
@@ -3148,10 +3275,11 @@ sub sendoffmail {
'','','','',$recipid);
}
}
- if (!$env{'form.multiforward'}) {
+ if (!$env{'form.multiforward'}) {
if ($sendstatus=~/^(\s*(?:ok|con_delayed)\s*)*$/) {
- $r->print('
'.&mt('Completed.').
- '');
+ my $message = &Apache::lonhtmlcommon::confirm_success(&mt('Completed.'));
+ $message = &Apache::loncommon::confirmwrapper($message);
+ $r->print($message);
if ($env{'form.displayedcrit'}) {
&discrit($r);
}
@@ -3161,8 +3289,10 @@ sub sendoffmail {
&Apache::loncommunicate::menu($r);
}
} else {
- $r->print(''.&mt('Could not deliver message').' '.
- &mt('Please use the browser "Back" button and correct the recipient addresses ([_1]).',$sendstatus).'
');
+ my $message = &Apache::lonhtmlcommon::confirm_success(&mt('Could not deliver message'),1);
+ $message .= '
'.&mt('Please use the browser "Back" button and correct the recipient addresses ([_1]).',$sendstatus);
+ $message = &Apache::loncommon::confirmwrapper($message);
+ $r->print($message);
}
}
}
@@ -3188,7 +3318,7 @@ sub handler {
'recordftf','sortedby','block','folder','startdis','interdis',
'showcommentbaseurl','dismode','group','subject','text','ref',
'msgstatus']);
- $sqs='&sortedby='.$env{'form.sortedby'};
+ $sqs='&sortedby='.$env{'form.sortedby'};
# ------------------------------------------------------ They checked for email
unless ($env{'form.block'}) {
@@ -3200,7 +3330,7 @@ sub handler {
&Apache::lonhtmlcommon::clear_breadcrumbs();
&Apache::lonhtmlcommon::add_breadcrumb
({href=>"/adm/communicate",
- text=>"Communication/Messages",
+ text=>"Messages",
faq=>12,bug=>'Communication Tools',});
# ------------------------------------------------------------------ Get Folder
@@ -3209,7 +3339,7 @@ sub handler {
unless ($folder) {
$folder='';
} else {
- $sqs.='&folder='.&escape($folder);
+ $sqs.='&folder='.&escape($folder);
}
# ------------------------------------------------------------ Get Display Mode
@@ -3241,7 +3371,7 @@ sub handler {
$startdis++;
}
my $postedstartdis=$startdis+1;
- $sqs.='&startdis='.$postedstartdis;
+ $sqs.='&startdis='.$postedstartdis;
# --------------------------------------------------------------- Render Output
@@ -3281,9 +3411,10 @@ sub handler {
my ($result,$msg) =
&statuschange($env{'form.markdel'},'deleted',$folder);
if (!$result) {
- $r->print(''.
- &mt('Failed to delete the message.').'
'.
- ''.$msg."
\n");
+ my $message = &Apache::lonhtmlcommon::confirm_success(&mt('Failed to delete the message.'),1);
+ $message .= ''.$msg.'
';
+ $message = &Apache::loncommon::confirmwrapper($message);
+ $r->print($message);
}
&Apache::loncommunicate::menu($r);
&disall($r,($folder?$folder:$dismode),$msgstatus);
@@ -3305,7 +3436,10 @@ sub handler {
$total ++;
}
&printheader($r,'','Marked Messages Read');
- $r->print(&mt('Marked [_1] message(s) read',$total).'');
+ my $message = &Apache::lonhtmlcommon::confirm_success(&mt('Marked [quant,_1,message] read',$total));
+ $message = &Apache::loncommon::confirmwrapper($message);
+ $r->print($message);
+ # $r->print('
');
&Apache::loncommunicate::menu($r);
&disall($r,($folder?$folder:$dismode),$msgstatus);
} elsif ($env{'form.markedaction'} eq 'markedunread') {
@@ -3316,7 +3450,10 @@ sub handler {
$total ++;
}
&printheader($r,'','Marked Messages Unread');
- $r->print(&mt('Marked [_1] message(s) unread',$total).'
');
+ my $message = &Apache::lonhtmlcommon::confirm_success(&mt('Marked [quant,_1,message] unread',$total));
+ $message = &Apache::loncommon::confirmwrapper($message);
+ $r->print($message);
+ # $r->print('
');
&Apache::loncommunicate::menu($r);
&disall($r,($folder?$folder:$dismode),$msgstatus);
} elsif ($env{'form.markedaction'} eq 'markedmove') {
@@ -3325,7 +3462,7 @@ sub handler {
&printheader($r,'','Moved Messages');
if (!defined($gotfolders{$destfolder})) {
$r->print(&mt('Destination folder [_1] is not a valid folder',
- $destfolder));
+ ''.$destfolder.''));
} else {
my ($total,$failed,@failed_msg)=(0,0);
my @to_move = &Apache::loncommon::get_env_multiple('form.delmark');
@@ -3339,15 +3476,17 @@ sub handler {
push(@failed_msg,$msg);
}
}
- if ($failed) {
- $r->print('
- '.&mt('Failed to move [_1] message(s)',$failed).
- '
');
- $r->print(''.
- join("
\n",@failed_msg).
- "
\n");
- }
- $r->print(&mt('Moved [_1] message(s)',$total).'');
+ my $message = '';
+ if ($failed) {
+ $message .= &Apache::lonhtmlcommon::confirm_success(&mt('Failed to move [quant,_1,message]',$failed),1);
+ $message .= '
'.
+ join("
\n",@failed_msg).
+ "
\n";
+ }
+ $message .= &Apache::lonhtmlcommon::confirm_success(&mt('Moved [quant,_1,message]',$total));
+ $message = &Apache::loncommon::confirmwrapper($message);
+ $r->print($message);
+ # $r->print('');
}
&Apache::loncommunicate::menu($r);
&disall($r,($folder?$folder:$dismode),$msgstatus);
@@ -3365,15 +3504,17 @@ sub handler {
}
}
&printheader($r,'','Deleted Messages');
+ my $message = '';
if ($failed) {
- $r->print('
- '.&mt('Failed to delete [_1] message(s)',$failed).
- '
');
- $r->print(''.
- join("
\n",@failed_msg).
- "
\n");
- }
- $r->print(&mt('Deleted [_1] message(s)',$total).'');
+ $message .= &Apache::lonhtmlcommon::confirm_success(&mt('Failed to delete [quant,_1,message]',$failed),1);
+ $message .= '
'.
+ join("
\n",@failed_msg).
+ "
\n";
+ }
+ $message .= &Apache::lonhtmlcommon::confirm_success(&mt('Deleted [quant,_1,message]',$total));
+ $message = &Apache::loncommon::confirmwrapper($message);
+ $r->print($message);
+ # $r->print('');
&Apache::loncommunicate::menu($r);
&disall($r,($folder?$folder:$dismode),$msgstatus);
} elsif ($env{'form.markunread'}) {
@@ -3429,19 +3570,19 @@ sub handler {
}
if (keys(%forwardok) > 0) {
my $count = keys(%forwardok);
- $r->print('
'.
- &mt('[quant,_1,message] forwarded.',$count).
- '');
+ my $message = &Apache::lonhtmlcommon::confirm_success(&mt('[quant,_1,message] forwarded.',$count));
+ $message = &Apache::loncommon::confirmwrapper($message);
+ $r->print($message);
}
if (keys(%forwardfail) > 0) {
my $count = keys(%forwardfail);
- $r->print('
'.
- &mt('Could not forward [quant,_1,message].',$count).
- ' ');
+ my $message = &Apache::lonhtmlcommon::confirm_success(&mt('Could not forward [quant,_1,message].',$count),1);
foreach my $key (keys(%forwardfail)) {
- $r->print(&mt('Could not deliver forwarded message.').' '.
- &mt('The recipient addresses may need to be corrected').' ('.$forwardfail{$key}.').
');
+ $message .= '
'.&mt('Could not deliver forwarded message.').' '.
+ &mt('The recipient addresses may need to be corrected').' ('.$forwardfail{$key}.')';
}
+ $message = &Apache::loncommon::confirmwrapper($message);
+ $r->print($message);
}
&Apache::loncommunicate::menu($r);
} else {
@@ -3465,10 +3606,13 @@ sub handler {
my $showfolder = $env{'form.newfolder'};
my ($makeresult,$warning) = &makefolder($env{'form.newfolder'});
if ($makeresult eq 'ok') {
- $r->print(&mt('Mail folder "[_1]" created.',$showfolder).'
');
+ my $message = &Apache::lonhtmlcommon::confirm_success(&mt('Folder "[_1]" created.',$showfolder));
+ $message = &Apache::loncommon::confirmwrapper($message);
+ $r->print($message);
} else {
- $r->print(&mt('Creation failed.').' '.$makeresult.'
'.
- $warning);
+ my $message = &Apache::lonhtmlcommon::confirm_success(&mt('Creation failed.').' '.$makeresult.'
'.$warning,1);
+ $message = &Apache::loncommon::confirmwrapper($message);
+ $r->print($message);
$showfolder = $folder;
}
&Apache::loncommunicate::menu($r);
@@ -3480,10 +3624,14 @@ sub handler {
my $showfolder = '';
my $delresult = &deletefolder($folder);
if ($delresult eq 'ok') {
- $r->print(&mt('Mail folder "[_1]" deleted.',$folder).'
');
+ my $message = &Apache::lonhtmlcommon::confirm_success(&mt('Folder "[_1]" deleted.',$folder));
+ $message = &Apache::loncommon::confirmwrapper($message);
+ $r->print($message);
$env{'form.folder'} = '';
} else {
- $r->print(&mt('Deletion failed.').' '.$delresult.'
');
+ my $message = &Apache::lonhtmlcommon::confirm_success(&mt('Deletion failed.').' '.$delresult,1);
+ $message = &Apache::loncommon::confirmwrapper($message);
+ $r->print($message);
$showfolder = $folder;
}
&Apache::loncommunicate::menu($r);
@@ -3493,9 +3641,13 @@ sub handler {
my $showfolder = $env{'form.renamed'};
my $renresult = &renamefolder($folder);
if ($renresult eq 'ok') {
- $r->print(&mt('Mail folder "[_1]" renamed "[_2]".',$folder,$showfolder).'
');
+ my $message = &Apache::lonhtmlcommon::confirm_success(&mt('Folder "[_1]" renamed to "[_2]".',$folder,$showfolder));
+ $message = &Apache::loncommon::confirmwrapper($message);
+ $r->print($message);
} else {
- $r->print(&mt('Renaming failed.').' '.$renresult.'
');
+ my $message = &Apache::lonhtmlcommon::confirm_success(&mt('Renaming failed.').' '.$renresult,1);
+ $message = &Apache::loncommon::confirmwrapper($message);
+ $r->print($message);
$showfolder = $folder;
}
&Apache::loncommunicate::menu($r);