version 1.102.2.13, 2010/03/26 16:25:38
|
version 1.102.2.14, 2010/04/14 05:16:47
|
Line 1960 sub print_contacts {
|
Line 1960 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 1981 sub print_contacts {
|
Line 1982 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 2024 sub print_contacts {
|
Line 2028 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 5025 sub modify_contacts {
|
Line 5034 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 5041 sub modify_contacts {
|
Line 5050 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 5065 sub modify_contacts {
|
Line 5078 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 5087 sub modify_contacts {
|
Line 5105 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 5115 sub modify_contacts {
|
Line 5138 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>'; |