version 1.7, 2007/04/04 00:10:01
|
version 1.8, 2007/04/05 21:36:15
|
Line 139 sub handler {
|
Line 139 sub handler {
|
$item,$domconfig{$item->{'action'}}); |
$item,$domconfig{$item->{'action'}}); |
} |
} |
$r->print(' |
$r->print(' |
</table> |
|
</td> |
|
</tr> |
|
</table> |
|
</td> |
</td> |
</tr> |
</tr> |
</table>'); |
</table>'); |
Line 277 function changePage(formname,newphase) {
|
Line 273 function changePage(formname,newphase) {
|
$js)); |
$js)); |
$r->print(&Apache::lonhtmlcommon::breadcrumbs('Domain Settings')); |
$r->print(&Apache::lonhtmlcommon::breadcrumbs('Domain Settings')); |
$r->print(' |
$r->print(' |
<form name="parmform"> |
<form name="parmform" action=""> |
<input type="hidden" name="pres_marker" /> |
<input type="hidden" name="pres_marker" /> |
<input type="hidden" name="pres_type" /> |
<input type="hidden" name="pres_type" /> |
<input type="hidden" name="pres_value" /> |
<input type="hidden" name="pres_value" /> |
Line 360 sub print_login {
|
Line 356 sub print_login {
|
} |
} |
} |
} |
} else { |
} else { |
$designs{'domlogo'} = ''; |
|
if (-e '/home/httpd/html/adm/lonDomLogos/'.$dom.'.gif') { |
|
$designs{'domlogo'} = '/home/httpd/html/adm/lonDomLogos/'.$dom.'.gif'; |
|
$is_custom{'domlogo'} = 1; |
|
} |
|
if ($designhash{$dom.'.login.img'} ne '') { |
|
$designs{'img'} = $designhash{$dom.'.login.img'}; |
|
$is_custom{'img'} = 1; |
|
} |
|
if ($designhash{$dom.'.login.logo'} ne '') { |
|
$designs{'logo'} = $designhash{$dom.'.login.logo'}; |
|
$is_custom{'logo'} = 1; |
|
} |
|
if ($designhash{$dom.'.login.font'} ne '') { |
if ($designhash{$dom.'.login.font'} ne '') { |
$designs{'font'} = $designhash{$dom.'.login.font'}; |
$designs{'font'} = $designhash{$dom.'.login.font'}; |
$is_custom{'font'} = 1; |
$is_custom{'font'} = 1; |
} |
} |
|
foreach my $item (@images) { |
|
if ($designhash{$dom.'.login.'.$item} ne '') { |
|
$designs{$item} = $designhash{$dom.'.login.'.$item}; |
|
$is_custom{$item} = 1; |
|
} |
|
} |
foreach my $item (@bgs) { |
foreach my $item (@bgs) { |
if ($designhash{$dom.'.login.'.$item} ne '') { |
if ($designhash{$dom.'.login.'.$item} ne '') { |
$designs{'bgs'}{$item} = $designhash{$dom.'.login.'.$item}; |
$designs{'bgs'}{$item} = $designhash{$dom.'.login.'.$item}; |
Line 398 sub print_login {
|
Line 387 sub print_login {
|
my $datatable = |
my $datatable = |
'<tr'.$css_class.'><td colspan="2">'.$choices{'coursecatalog'}. |
'<tr'.$css_class.'><td colspan="2">'.$choices{'coursecatalog'}. |
'</td><td>'. |
'</td><td>'. |
'<nobr><input type="radio" name="coursecatalog"'. |
'<span class="LC_nobreak"><label><input type="radio" name="coursecatalog"'. |
$catalogon.' value="1" />'.&mt('Yes').' '. |
$catalogon.' value="1" />'.&mt('Yes').'</label> '. |
'<input type="radio" name="coursecatalog"'. |
'<label><input type="radio" name="coursecatalog"'. |
$catalogoff.'value="0" />'.&mt('No').'</nobr></td>'. |
$catalogoff.'value="0" />'.&mt('No').'</label></span></td>'. |
'</tr>'; |
'</tr>'; |
$itemcount ++; |
$itemcount ++; |
$css_class = $itemcount%2?' class="LC_odd_row"':''; |
$css_class = $itemcount%2?' class="LC_odd_row"':''; |
$datatable .= '<tr'.$css_class.'>'. |
$datatable .= '<tr'.$css_class.'>'. |
'<td colspan="2">'.$choices{'adminmail'}.'</td>'. |
'<td colspan="2">'.$choices{'adminmail'}.'</td>'. |
'<td><nobr>'. |
'<td><span class="LC_nobreak">'. |
'<input type="radio" name="adminmail"'. |
'<label><input type="radio" name="adminmail"'. |
$adminmailon.' value="1" />'.&mt('Yes').' '. |
$adminmailon.' value="1" />'.&mt('Yes').'</label> '. |
'<input type="radio" name="adminmail"'. |
'<label><input type="radio" name="adminmail"'. |
$adminmailoff.'value="0" />'.&mt('No').'</nobr></td>'; |
$adminmailoff.'value="0" />'.&mt('No').'</label></span></td></tr>'; |
$itemcount ++; |
$itemcount ++; |
$datatable .= &display_color_options($dom,$phase,'login',$itemcount,\%choices,\%is_custom,\%defaults,\%designs,\@images,\@bgs,\@links,\%alt_text); |
$datatable .= &display_color_options($dom,$phase,'login',$itemcount,\%choices,\%is_custom,\%defaults,\%designs,\@images,\@bgs,\@links,\%alt_text); |
$datatable .= '</tr></table></td></tr>'; |
$datatable .= '</tr></table></td></tr>'; |
Line 506 sub print_rolecolors {
|
Line 495 sub print_rolecolors {
|
} |
} |
} |
} |
my $itemcount = 1; |
my $itemcount = 1; |
my $datatable = display_color_options($dom,$phase,$role,$itemcount,\%choices,\%is_custom,\%defaults,\%designs,\@images,\@bgs,\@links,\%alt_text); |
my $datatable = &display_color_options($dom,$phase,$role,$itemcount,\%choices,\%is_custom,\%defaults,\%designs,\@images,\@bgs,\@links,\%alt_text); |
$datatable .= '</tr></table></td></tr>'; |
$datatable .= '</tr></table></td></tr>'; |
return $datatable; |
return $datatable; |
} |
} |
Line 524 sub display_color_options {
|
Line 513 sub display_color_options {
|
$datatable .= '<td> </td>'; |
$datatable .= '<td> </td>'; |
} |
} |
my $fontlink = &color_pick($phase,$role,'font',$choices->{'font'},$designs->{'font'}); |
my $fontlink = &color_pick($phase,$role,'font',$choices->{'font'},$designs->{'font'}); |
$datatable .= '<td><nobr>'. |
$datatable .= '<td><span class="LC_nobreak">'. |
'<input type="text" size="10" name="'.$role.'_font"'. |
'<input type="text" size="10" name="'.$role.'_font"'. |
' value="'.$designs->{'font'}.'" /> '.$fontlink. |
' value="'.$designs->{'font'}.'" /> '.$fontlink. |
'</nobr></td></tr>'; |
'</span></td></tr>'; |
foreach my $img (@{$images}) { |
foreach my $img (@{$images}) { |
$itemcount ++; |
$itemcount ++; |
$css_class = $itemcount%2?' class="LC_odd_row"':''; |
$css_class = $itemcount%2?' class="LC_odd_row"':''; |
$datatable .= '</tr><tr'.$css_class.'>'. |
$datatable .= '<tr'.$css_class.'>'. |
'<td>'.$choices->{$img}.'</td>'; |
'<td>'.$choices->{$img}.'</td>'; |
my $imgfile; |
my $imgfile; |
if ($designs->{$img} ne '') { |
if ($designs->{$img} ne '') { |
Line 578 sub display_color_options {
|
Line 567 sub display_color_options {
|
$datatable.= '<img src="'.$showfile.'" alt="'. |
$datatable.= '<img src="'.$showfile.'" alt="'. |
$alt_text->{$img}.'" /></td>'; |
$alt_text->{$img}.'" /></td>'; |
if ($is_custom->{$img}) { |
if ($is_custom->{$img}) { |
$datatable.='<td><nobr><input type="checkbox" name="'.$role.'_del_'.$img.'" value="1">'. |
$datatable.='<td><span class="LC_nobreak"><label><input type="checkbox" name="'. |
&mt('Delete?').' '.&mt('Replace:').'</nobr><br />'; |
$role.'_del_'.$img.'" value="1" />'.&mt('Delete?'). |
|
'</label> '.&mt('Replace:').'</span><br />'; |
} else { |
} else { |
$datatable.='<td valign="bottom">'.&mt('Upload:').'<br />'; |
$datatable.='<td valign="bottom">'.&mt('Upload:').'<br />'; |
} |
} |
Line 591 sub display_color_options {
|
Line 581 sub display_color_options {
|
$datatable .= '<td colspan="2" class="LC_right_item"><br />'. |
$datatable .= '<td colspan="2" class="LC_right_item"><br />'. |
&mt('Upload:'); |
&mt('Upload:'); |
} |
} |
$datatable .= ' <input type="file" name="'.$role.'_'.$img.'" /></nobr></td></tr>'; |
$datatable .= ' <input type="file" name="'.$role.'_'.$img.'" /></td></tr>'; |
} |
} |
$itemcount ++; |
$itemcount ++; |
$css_class = $itemcount%2?' class="LC_odd_row"':''; |
$css_class = $itemcount%2?' class="LC_odd_row"':''; |
Line 604 sub display_color_options {
|
Line 594 sub display_color_options {
|
} |
} |
} |
} |
if ($bgs_def) { |
if ($bgs_def) { |
$datatable .= '<td>'.&mt('Default(s) in use').'<br /><table border="0"><tr>'.$bgs_def.'</tr></table></td>'; |
$datatable .= '<td>'.&mt('Default(s) in use:').'<br /><table border="0"><tr>'.$bgs_def.'</tr></table></td>'; |
} else { |
} else { |
$datatable .= '<td> </td>'; |
$datatable .= '<td> </td>'; |
} |
} |
Line 631 sub display_color_options {
|
Line 621 sub display_color_options {
|
} |
} |
} |
} |
if ($links_def) { |
if ($links_def) { |
$datatable .= '<td>'.&mt('Default(s) in use').'<br /><table border="0"><tr>'.$links_def.'</tr></table></td>'; |
$datatable .= '<td>'.&mt('Default(s) in use:').'<br /><table border="0"><tr>'.$links_def.'</tr></table></td>'; |
} else { |
} else { |
$datatable .= '<td> </td>'; |
$datatable .= '<td> </td>'; |
} |
} |
Line 710 sub print_quotas {
|
Line 700 sub print_quotas {
|
$css_class = $typecount%2?' class="LC_odd_row"':''; |
$css_class = $typecount%2?' class="LC_odd_row"':''; |
$datatable .= '<tr'.$css_class.'>'. |
$datatable .= '<tr'.$css_class.'>'. |
'<td>'.$usertypes->{$type}.'</td>'. |
'<td>'.$usertypes->{$type}.'</td>'. |
'<td class="LC_right_item"><nobr>'. |
'<td class="LC_right_item"><span class="LC_nobreak">'. |
'<input type="text" name="quota_'.$type. |
'<input type="text" name="quota_'.$type. |
'" value="'.$settings->{$type}. |
'" value="'.$settings->{$type}. |
'" size="5" /> Mb</nobr></td></tr>'; |
'" size="5" /> Mb</span></td></tr>'; |
} |
} |
} |
} |
$othertitle = "Other users"; |
$othertitle = "Other users"; |
Line 728 sub print_quotas {
|
Line 718 sub print_quotas {
|
$css_class = $typecount%2?' class="LC_odd_row"':''; |
$css_class = $typecount%2?' class="LC_odd_row"':''; |
$datatable .= '<tr'.$css_class.'>'. |
$datatable .= '<tr'.$css_class.'>'. |
'<td>'.&mt($othertitle).'</td>'. |
'<td>'.&mt($othertitle).'</td>'. |
'<td class="LC_right_item"><nobr>'. |
'<td class="LC_right_item"><span class="LC_nobreak">'. |
'<input type="text" name="default" value="'. |
'<input type="text" name="default" value="'. |
$defaultquota.'" size="5" /> Mb</nobr></td></tr>'; |
$defaultquota.'" size="5" /> Mb</span></td></tr>'; |
return $datatable; |
return $datatable; |
} |
} |
|
|
Line 764 sub print_autoenroll {
|
Line 754 sub print_autoenroll {
|
my $domform = &Apache::loncommon::select_dom_form($defdom,'sender_domain',1); |
my $domform = &Apache::loncommon::select_dom_form($defdom,'sender_domain',1); |
my $datatable='<tr class="LC_odd_row">'. |
my $datatable='<tr class="LC_odd_row">'. |
'<td>'.&mt('Auto-enrollment active?').'</td>'. |
'<td>'.&mt('Auto-enrollment active?').'</td>'. |
'<td class="LC_right_item"><nobr>'. |
'<td class="LC_right_item"><span class="LC_nobreak"><label>'. |
'<input type="radio" name="autoenroll_run"'. |
'<input type="radio" name="autoenroll_run"'. |
$runon.' value="1" />'.&mt('Yes').' '. |
$runon.' value="1" />'.&mt('Yes').'</label> '. |
'<input type="radio" name="autoenroll_run"'. |
'<label><input type="radio" name="autoenroll_run"'. |
$runoff.'value="0" />'.&mt('No').'</nobr></td>'. |
$runoff.'value="0" />'.&mt('No').'</label></span></td>'. |
'</tr><tr>'. |
'</tr><tr>'. |
'<td>'.&mt('Notification messages - sender'). |
'<td>'.&mt('Notification messages - sender'). |
'</td><td class="LC_right_item"><nobr>'. |
'</td><td class="LC_right_item"><span class="LC_nobreak">'. |
&mt('username').': '. |
&mt('username').': '. |
'<input type="text" name="sender_uname" value="'. |
'<input type="text" name="sender_uname" value="'. |
$settings->{'sender_uname'}. |
$settings->{'sender_uname'}. |
'" size="10" /> '.&mt('domain'). |
'" size="10" /> '.&mt('domain'). |
': '.$domform.'</nobr></td></tr>'; |
': '.$domform.'</span></td></tr>'; |
return $datatable; |
return $datatable; |
} |
} |
|
|
Line 804 sub print_autoupdate {
|
Line 794 sub print_autoupdate {
|
); |
); |
$datatable = '<tr class="LC_odd_row">'. |
$datatable = '<tr class="LC_odd_row">'. |
'<td>'.&mt($title{'run'}).'</td>'. |
'<td>'.&mt($title{'run'}).'</td>'. |
'<td class="LC_right_item"><nobr>'. |
'<td class="LC_right_item"><span class="LC_nobreak"><label>'. |
'<input type="radio" name="autoupdate_run"'. |
|
$updateon.' value="1" />'.&mt('Yes').' '. |
|
'<input type="radio" name="autoupdate_run"'. |
'<input type="radio" name="autoupdate_run"'. |
$updateoff.'value="0" />'.&mt('No').'</nobr></td>'. |
$updateon.' value="1" />'.&mt('Yes').'</label> '. |
|
'<label><input type="radio" name="autoupdate_run"'. |
|
$updateoff.'value="0" />'.&mt('No').'</label></span></td>'. |
'</tr><tr>'. |
'</tr><tr>'. |
'<td>'.&mt($title{'classlists'}).'</td>'. |
'<td>'.&mt($title{'classlists'}).'</td>'. |
'<td class="LC_right_item"><nobr>'. |
'<td class="LC_right_item"><span class="LC_nobreak">'. |
'<input type="radio" name="classlists"'. |
'<label><input type="radio" name="classlists"'. |
$classlistson.' value="1" />'.&mt('Yes').' '. |
$classlistson.' value="1" />'.&mt('Yes').'</label> '. |
'<input type="radio" name="classlists"'. |
'<label><input type="radio" name="classlists"'. |
$classlistsoff.'value="0" />'.&mt('No').'</nobr></td>'. |
$classlistsoff.'value="0" />'.&mt('No').'</label></span></td>'. |
'</tr>'; |
'</tr>'; |
} else { |
} else { |
my ($usertypes,$order) = &Apache::lonnet::retrieve_inst_usertypes($dom); |
my ($usertypes,$order) = &Apache::lonnet::retrieve_inst_usertypes($dom); |
Line 892 sub usertype_update_row {
|
Line 882 sub usertype_update_row {
|
} else { |
} else { |
$datatable .= '<td>'; |
$datatable .= '<td>'; |
} |
} |
$datatable .= '<nobr><input type="checkbox" name="updateable_'. |
$datatable .= '<span class="LC_nobreak"><label>'. |
$type.'_'.$fields->[$i].'" '. |
'<input type="checkbox" name="updateable_'.$type. |
'" value="1"'.$check.'/>'. |
'_'.$fields->[$i].'" value="1"'.$check.'/>'. |
$fieldtitles->{$fields->[$i]}.'</nobr></td>'; |
$fieldtitles->{$fields->[$i]}.'</label></span></td>'; |
} |
} |
$datatable .= '</tr></table></td></tr>'; |
$datatable .= '</tr></table></td></tr>'; |
} |
} |
Line 1017 sub modify_colors {
|
Line 1007 sub modify_colors {
|
foreach my $item (@bgs,@links) { |
foreach my $item (@bgs,@links) { |
$confhash->{$role}{$item} = $env{'form.'.$role.'_'.$item}; |
$confhash->{$role}{$item} = $env{'form.'.$role.'_'.$item}; |
} |
} |
foreach my $img (@images) { |
foreach my $img (@images) { |
if ($env{'form.'.$role.'_'.$img.'.filename'} ne '') { |
if ($env{'form.'.$role.'_'.$img.'.filename'} ne '') { |
my $configuserok; |
my $configuserok; |
if (&Apache::lonnet::homeserver($configuname,$dom) eq 'no_host') { |
if (&Apache::lonnet::homeserver($configuname,$dom) eq 'no_host') { |
Line 1043 sub modify_colors {
|
Line 1033 sub modify_colors {
|
} |
} |
} else { |
} else { |
my $error = &mt("Upload of image [_1] for $role page(s) failed because a Domain Configuation user ([_2]) could not be created in domain: [_3]. Error was: [_4].",$img,$configuname,$dom,$configuserok); |
my $error = &mt("Upload of image [_1] for $role page(s) failed because a Domain Configuation user ([_2]) could not be created in domain: [_3]. Error was: [_4].",$img,$configuname,$dom,$configuserok); |
&Apache::lonnet::logthis($error); |
&Apache::lonnet::logthis($error); |
$errors .= '<li>'.$error.'</li>'; |
$errors .= '<li>'.$error.'</li>'; |
|
} |
|
} elsif ($domconfig->{$role}{$img} ne '') { |
|
if ($domconfig->{$role}{$img} !~ m|^/uploaded/\Q$dom\E/\Q$dom\E\-domainconfig/portfolio/\$img/.+|) { |
|
#FIXME copy file to target directory |
} |
} |
} |
} |
} |
} |