'
+ .&additional_item($type)
+ );
}
return;
}
@@ -1568,6 +1548,7 @@ sub display_access_row {
sub course_js {
return qq|
|;
}
@@ -1659,7 +1641,7 @@ sub course_row {
}
$r->print(' '.&mt('Add a roles-based condition').
' {'domain'}','$content->{'number'}',
'$showtype'".')" value="" />');
$newrole_id = $max_id;
@@ -1724,14 +1706,16 @@ sub additional_item {
my ($type) = @_;
my $showtype;
if ($type eq 'course') {
- $showtype = &mt('course/community');
+ $showtype = 'course/community';
} elsif ($type eq 'domains') {
- $showtype = &mt('domains');
+ $showtype = 'domain';
} elsif ($type eq 'users') {
- $showtype = &mt('users');
+ $showtype = 'user';
}
- my $output = &mt('Add new [_1] condition(s)?',$showtype).' '.&mt('Number to add: ').'';
- return $output;
+ return
+ &mt('Add new '.$showtype.'-based condition(s)?')
+ .' '.&mt('Number to add: ')
+ .'';
}
sub actionbox {
@@ -2101,21 +2085,24 @@ function confirmOverwrite() {
}
// ]]>
+
$msg
-
+
+
END
} else {
$r->print(
@@ -2213,10 +2200,13 @@ sub overwrite {
}
}
if ($fname eq '') {
- my $msg = &mt('Invalid filename: [_1]; the name of the uploaded file did not contain any letters, '.
+ $r->print(
+ &Apache::loncommon::confirmwrapper(
+ &Apache::lonhtmlcommon::confirm_success(
+ &mt('Invalid filename: [_1]; the name of the uploaded file did not contain any letters, '.
'so after eliminating special characters there was nothing left.',
- ''.$env{'form.filename'}.'');
- $r->print($msg.&done(undef,$url));
+ ''.$env{'form.filename'}.''),1)));
+ $r->print(&done(undef,$url));
return;
}
$env{'form.'.$formname.'.filename'} = $fname;
@@ -2227,9 +2217,11 @@ sub overwrite {
\%allfiles,\%codebase,undef,undef,undef,
undef,undef,undef,\$mimetype);
if ($result !~ m|^/uploaded/|) {
- $r->print('
'.&mt('An error occurred ([_1]) while trying to overwrite [_2].'
- ,$result,&display_file(undef,$fname)).'
');
- $r->print(&after_overwrite(&mt('Back'),$url));
+ $r->print(
+ &Apache::loncommon::confirmwrapper(
+ &Apache::lonhtmlcommon::confirm_success(
+ &mt('An error occurred ([_1]) while trying to overwrite [_2].'
+ ,$result,&display_file(undef,$fname)),1)));
} else {
if ($mode eq 'parse') {
if ($mimetype eq 'text/html') {
@@ -2237,18 +2229,21 @@ sub overwrite {
&print_dependency_form($r,$url,\%allfiles,\%codebase,$result);
return;
} else {
- $r->print('