version 1.133, 2010/03/22 17:23:34
|
version 1.134, 2010/04/14 04:27:20
|
Line 988 sub display_color_options {
|
Line 988 sub display_color_options {
|
my ($dom,$confname,$phase,$role,$itemcount,$choices,$is_custom,$defaults,$designs, |
my ($dom,$confname,$phase,$role,$itemcount,$choices,$is_custom,$defaults,$designs, |
$images,$bgs,$links,$alt_text,$rowtotal,$logintext,$loginheader) = @_; |
$images,$bgs,$links,$alt_text,$rowtotal,$logintext,$loginheader) = @_; |
my $css_class = $itemcount%2?' class="LC_odd_row"':''; |
my $css_class = $itemcount%2?' class="LC_odd_row"':''; |
my $datatable = '<tr>'. |
my $datatable = '<tr'.$css_class.'>'. |
'<td>'.$choices->{'font'}.'</td>'; |
'<td>'.$choices->{'font'}.'</td>'; |
if (!$is_custom->{'font'}) { |
if (!$is_custom->{'font'}) { |
$datatable .= '<td>'.&mt('Default in use:').' <span id="css_default_'.$role.'_font" style="color: '.$defaults->{'font'}.';">'.$defaults->{'font'}.'</span></td>'; |
$datatable .= '<td>'.&mt('Default in use:').' <span id="css_default_'.$role.'_font" style="color: '.$defaults->{'font'}.';">'.$defaults->{'font'}.'</span></td>'; |
Line 2014 sub print_contacts {
|
Line 2014 sub print_contacts {
|
my ($dom,$settings,$rowtotal) = @_; |
my ($dom,$settings,$rowtotal) = @_; |
my $datatable; |
my $datatable; |
my @contacts = ('adminemail','supportemail'); |
my @contacts = ('adminemail','supportemail'); |
my (%checked,%to,%otheremails); |
my (%checked,%to,%otheremails,%bccemails); |
my @mailings = ('errormail','packagesmail','lonstatusmail','helpdeskmail', |
my @mailings = ('errormail','packagesmail','lonstatusmail','helpdeskmail', |
'requestsmail'); |
'requestsmail'); |
foreach my $type (@mailings) { |
foreach my $type (@mailings) { |
$otheremails{$type} = ''; |
$otheremails{$type} = ''; |
} |
} |
|
$bccemails{'helpdeskmail'} = ''; |
if (ref($settings) eq 'HASH') { |
if (ref($settings) eq 'HASH') { |
foreach my $item (@contacts) { |
foreach my $item (@contacts) { |
if (exists($settings->{$item})) { |
if (exists($settings->{$item})) { |
Line 2035 sub print_contacts {
|
Line 2036 sub print_contacts {
|
} |
} |
} |
} |
$otheremails{$type} = $settings->{$type}{'others'}; |
$otheremails{$type} = $settings->{$type}{'others'}; |
|
if ($type eq 'helpdeskmail') { |
|
$bccemails{$type} = $settings->{$type}{'bcc'}; |
|
} |
} |
} |
} elsif ($type eq 'lonstatusmail') { |
} elsif ($type eq 'lonstatusmail') { |
$checked{'lonstatusmail'}{'adminemail'} = ' checked="checked" '; |
$checked{'lonstatusmail'}{'adminemail'} = ' checked="checked" '; |
Line 2078 sub print_contacts {
|
Line 2082 sub print_contacts {
|
} |
} |
$datatable .= '</span><br />'.&mt('Others').': '. |
$datatable .= '</span><br />'.&mt('Others').': '. |
'<input type="text" name="'.$type.'_others" '. |
'<input type="text" name="'.$type.'_others" '. |
'value="'.$otheremails{$type}.'" />'. |
'value="'.$otheremails{$type}.'" />'; |
'</td></tr>'."\n"; |
if ($type eq 'helpdeskmail') { |
|
$datatable .= '<br />'.&mt('Bcc').':'.(' 'x6). |
|
'<input type="text" name="'.$type.'_bcc" '. |
|
'value="'.$bccemails{$type}.'" />'; |
|
} |
|
$datatable .= '</td></tr>'."\n"; |
} |
} |
$$rowtotal += $rownum; |
$$rowtotal += $rownum; |
return $datatable; |
return $datatable; |
Line 5186 sub modify_contacts {
|
Line 5195 sub modify_contacts {
|
$currsetting{$key} = $domconfig{'contacts'}{$key}; |
$currsetting{$key} = $domconfig{'contacts'}{$key}; |
} |
} |
} |
} |
my (%others,%to); |
my (%others,%to,%bcc); |
my @contacts = ('supportemail','adminemail'); |
my @contacts = ('supportemail','adminemail'); |
my @mailings = ('errormail','packagesmail','helpdeskmail','lonstatusmail', |
my @mailings = ('errormail','packagesmail','helpdeskmail','lonstatusmail', |
'requestsmail'); |
'requestsmail'); |
Line 5202 sub modify_contacts {
|
Line 5211 sub modify_contacts {
|
} |
} |
$others{$type} = $env{'form.'.$type.'_others'}; |
$others{$type} = $env{'form.'.$type.'_others'}; |
$contacts_hash{contacts}{$type}{'others'} = $others{$type}; |
$contacts_hash{contacts}{$type}{'others'} = $others{$type}; |
|
if ($type eq 'helpdeskmail') { |
|
$bcc{$type} = $env{'form.'.$type.'_bcc'}; |
|
$contacts_hash{contacts}{$type}{'bcc'} = $bcc{$type}; |
|
} |
} |
} |
foreach my $item (@contacts) { |
foreach my $item (@contacts) { |
$to{$item} = $env{'form.'.$item}; |
$to{$item} = $env{'form.'.$item}; |
Line 5226 sub modify_contacts {
|
Line 5239 sub modify_contacts {
|
if ($others{$type} ne $currsetting{$type}{'others'}) { |
if ($others{$type} ne $currsetting{$type}{'others'}) { |
push(@{$changes{$type}},'others'); |
push(@{$changes{$type}},'others'); |
} |
} |
|
if ($type eq 'helpdeskmail') { |
|
if ($bcc{$type} ne $currsetting{$type}{'bcc'}) { |
|
push(@{$changes{$type}},'bcc'); |
|
} |
|
} |
} |
} |
} else { |
} else { |
my %default; |
my %default; |
Line 5248 sub modify_contacts {
|
Line 5266 sub modify_contacts {
|
} |
} |
if ($others{$type} ne '') { |
if ($others{$type} ne '') { |
push(@{$changes{$type}},'others'); |
push(@{$changes{$type}},'others'); |
} |
} |
|
if ($type eq 'helpdeskmail') { |
|
if ($bcc{$type} ne '') { |
|
push(@{$changes{$type}},'bcc'); |
|
} |
|
} |
} |
} |
} |
} |
my $putresult = &Apache::lonnet::put_dom('configuration',\%contacts_hash, |
my $putresult = &Apache::lonnet::put_dom('configuration',\%contacts_hash, |
Line 5276 sub modify_contacts {
|
Line 5299 sub modify_contacts {
|
push(@text,$others{$type}); |
push(@text,$others{$type}); |
} |
} |
$resulttext .= '<span class="LC_cusr_emph">'. |
$resulttext .= '<span class="LC_cusr_emph">'. |
join(', ',@text).'</span></li>'; |
join(', ',@text).'</span>'; |
|
if ($type eq 'helpdeskmail') { |
|
if ($bcc{$type} ne '') { |
|
$resulttext .= ' '.&mt('with Bcc to').': <span class="LC_cusr_emph">'.$bcc{$type}.'</span>'; |
|
} |
|
} |
|
$resulttext .= '</li>'; |
} |
} |
} |
} |
$resulttext .= '</ul>'; |
$resulttext .= '</ul>'; |