version 1.399, 2021/12/28 02:04:35
|
version 1.403, 2022/01/19 16:54:16
|
Line 1357 sub print_login {
|
Line 1357 sub print_login {
|
} |
} |
} |
} |
my @images = ('img','logo','domlogo','login'); |
my @images = ('img','logo','domlogo','login'); |
|
my @alttext = ('img','logo','domlogo'); |
my @logintext = ('textcol','bgcol'); |
my @logintext = ('textcol','bgcol'); |
my @bgs = ('pgbg','mainbg','sidebg'); |
my @bgs = ('pgbg','mainbg','sidebg'); |
my @links = ('link','alink','vlink'); |
my @links = ('link','alink','vlink'); |
Line 1398 sub print_login {
|
Line 1399 sub print_login {
|
$designs{'showlogo'}{$item} = $settings->{'showlogo'}{$item}; |
$designs{'showlogo'}{$item} = $settings->{'showlogo'}{$item}; |
} |
} |
} |
} |
|
foreach my $item (@alttext) { |
|
if (ref($settings->{'alttext'}) eq 'HASH') { |
|
if ($settings->{'alttext'}->{$item} ne '') { |
|
$designs{'alttext'}{$item} = $settings->{'alttext'}{$item}; |
|
} |
|
} |
|
} |
foreach my $item (@logintext) { |
foreach my $item (@logintext) { |
if ($settings->{$item} ne '') { |
if ($settings->{$item} ne '') { |
$designs{'logintext'}{$item} = $settings->{$item}; |
$designs{'logintext'}{$item} = $settings->{$item}; |
Line 1707 sub login_choices {
|
Line 1715 sub login_choices {
|
current => "Current", |
current => "Current", |
samllanding => "Dual login?", |
samllanding => "Dual login?", |
samloptions => "Options", |
samloptions => "Options", |
|
alttext => "Alt text", |
); |
); |
return %choices; |
return %choices; |
} |
} |
Line 2052 sub display_color_options {
|
Line 2061 sub display_color_options {
|
$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>'.$choices->{$img}; |
'<td>'.$choices->{$img}; |
my ($imgfile,$img_import,$login_hdr_pick,$logincolors); |
my ($imgfile,$img_import,$login_hdr_pick,$logincolors,$alttext); |
if ($role eq 'login') { |
if ($role eq 'login') { |
if ($img eq 'login') { |
if ($img eq 'login') { |
$login_hdr_pick = |
$login_hdr_pick = |
Line 2060 sub display_color_options {
|
Line 2069 sub display_color_options {
|
$logincolors = |
$logincolors = |
&login_text_colors($img,$role,$logintext,$phase,$choices, |
&login_text_colors($img,$role,$logintext,$phase,$choices, |
$designs,$defaults); |
$designs,$defaults); |
} elsif ($img ne 'domlogo') { |
} else { |
$datatable.= &logo_display_options($img,$defaults,$designs); |
if ($img ne 'domlogo') { |
|
$datatable.= &logo_display_options($img,$defaults,$designs); |
|
} |
|
if (ref($designs->{'alttext'}) eq 'HASH') { |
|
$alttext = $designs->{'alttext'}{$img}; |
|
} |
} |
} |
} |
} |
$datatable .= '</td>'; |
$datatable .= '</td>'; |
Line 2153 sub display_color_options {
|
Line 2167 sub display_color_options {
|
$datatable .=' <input type="file" name="'.$role.'_'.$img.'" />'; |
$datatable .=' <input type="file" name="'.$role.'_'.$img.'" />'; |
} |
} |
} |
} |
|
if (($role eq 'login') && ($img ne 'login')) { |
|
$datatable .= (' ' x2).' <span class="LC_nobreak"><label>'.$choices->{'alttext'}.':'. |
|
'<input type="text" name="'.$role.'_alt_'.$img.'" size="10" value="'.$alttext.'" />'. |
|
'</label></span>'; |
|
} |
$datatable .= '</td></tr>'; |
$datatable .= '</td></tr>'; |
} |
} |
$itemcount ++; |
$itemcount ++; |
Line 3880 sub print_autoenroll {
|
Line 3899 sub print_autoenroll {
|
if (exists($settings->{'failsafe'})) { |
if (exists($settings->{'failsafe'})) { |
$failsafe = $settings->{'failsafe'}; |
$failsafe = $settings->{'failsafe'}; |
if ($failsafe eq 'zero') { |
if ($failsafe eq 'zero') { |
$failsafechecked{'zero'} = ' checked="checked"'; |
$failsafechecked{'zero'} = ' checked="checked"'; |
$failsafechecked{'off'} = ''; |
$failsafechecked{'off'} = ''; |
$failsafesty = 'inline-block'; |
$failsafesty = 'inline-block'; |
} elsif ($failsafe eq 'any') { |
} elsif ($failsafe eq 'any') { |
Line 3893 sub print_autoenroll {
|
Line 3912 sub print_autoenroll {
|
if ($autofailsafe ne '') { |
if ($autofailsafe ne '') { |
$failsafechecked{'zero'} = ' checked="checked"'; |
$failsafechecked{'zero'} = ' checked="checked"'; |
$failsafe = 'zero'; |
$failsafe = 'zero'; |
$failsafechecked{'off'} = ''; |
$failsafechecked{'off'} = ''; |
} |
} |
} |
} |
} else { |
} else { |
Line 3933 sub print_autoenroll {
|
Line 3952 sub print_autoenroll {
|
$coownersoff.' value="0" />'.&mt('No').'</label></span></td>'. |
$coownersoff.' value="0" />'.&mt('No').'</label></span></td>'. |
'</tr><tr>'. |
'</tr><tr>'. |
'<td>'.&mt('Failsafe for no drops when institutional data missing').'</td>'. |
'<td>'.&mt('Failsafe for no drops when institutional data missing').'</td>'. |
'<td class="LC_right_item"><span class="LC_nobreak">'. |
'<td class="LC_left_item"><span class="LC_nobreak">'. |
'<span class="LC_nobreak"><label><input type="radio name="autoenroll_failsafe" value="off" onclick="toggleFailsafe(this.form)" />'.&mt('Not in use').'</label></span><br />'. |
'<span class="LC_nobreak"><label><input type="radio" name="autoenroll_failsafe" value="off" onclick="toggleFailsafe(this.form)"'.$failsafechecked{'off'}.' />'.&mt('Not in use').'</label></span> '. |
'<span class="LC_nobreak"><label><input type="radio name="autoenroll_failsafe" value="zero" onclick="toggleFailsafe(this.form)" />'.&mt('Retrieved section enrollment is zero').'</label></span><br />'. |
'<span class="LC_nobreak"><label><input type="radio" name="autoenroll_failsafe" value="zero" onclick="toggleFailsafe(this.form)"'.$failsafechecked{'zero'}.' />'.&mt('Retrieved section enrollment is zero').'</label></span><br />'. |
'<span class="LC_nobreak"><label><input type="radio name="autoenroll_failsafe" value="any" onclick="toggleFailsafe(this.form)" />'.&mt('Retrieved section enrollment is zero or greater').'</label></span>'. |
'<span class="LC_nobreak"><label><input type="radio" name="autoenroll_failsafe" value="any" onclick="toggleFailsafe(this.form)"'.$failsafechecked{'any'}.' />'.&mt('Retrieved section enrollment is zero or greater').'</label></span>'. |
'<div class="LC_floatleft" style="display:'.$failsafesty.';" id="autoenroll_failsafe_div">'. |
'<div class="LC_floatleft" style="display:'.$failsafesty.';" id="autoenroll_failsafe_div">'. |
'<span class="LC_nobreak">'. |
'<span class="LC_nobreak">'. |
&mt('Threshold for number of students in section to drop: [_1]', |
&mt('Threshold for number of students in section to drop: [_1]', |
Line 12856 sub modify_colors {
|
Line 12875 sub modify_colors {
|
$domconfig->{$role} = {}; |
$domconfig->{$role} = {}; |
} |
} |
foreach my $img (@images) { |
foreach my $img (@images) { |
if (($role eq 'login') && (($img eq 'img') || ($img eq 'logo'))) { |
if ($role eq 'login') { |
if (defined($env{'form.login_showlogo_'.$img})) { |
if (($img eq 'img') || ($img eq 'logo')) { |
$confhash->{$role}{'showlogo'}{$img} = 1; |
if (defined($env{'form.login_showlogo_'.$img})) { |
} else { |
$confhash->{$role}{'showlogo'}{$img} = 1; |
$confhash->{$role}{'showlogo'}{$img} = 0; |
} else { |
|
$confhash->{$role}{'showlogo'}{$img} = 0; |
|
} |
} |
} |
} |
if ($env{'form.login_alt_'.$img} ne '') { |
|
$confhash->{$role}{'alttext'}{$img} = $env{'form.login_alt_'.$img}; |
|
} |
|
} |
if ( ! $env{'form.'.$role.'_'.$img.'.filename'} |
if ( ! $env{'form.'.$role.'_'.$img.'.filename'} |
&& !defined($domconfig->{$role}{$img}) |
&& !defined($domconfig->{$role}{$img}) |
&& !$env{'form.'.$role.'_del_'.$img} |
&& !$env{'form.'.$role.'_del_'.$img} |
Line 12937 sub modify_colors {
|
Line 12961 sub modify_colors {
|
$changes{$role}{'images'}{$img} = 1; |
$changes{$role}{'images'}{$img} = 1; |
} |
} |
} |
} |
if (($role eq 'login') && (($img eq 'logo') || ($img eq 'img'))) { |
if ($role eq 'login') { |
if (ref($domconfig->{'login'}{'showlogo'}) eq 'HASH') { |
if (($img eq 'logo') || ($img eq 'img')) { |
if ($confhash->{$role}{'showlogo'}{$img} ne |
if (ref($domconfig->{'login'}{'showlogo'}) eq 'HASH') { |
$domconfig->{$role}{'showlogo'}{$img}) { |
if ($confhash->{$role}{'showlogo'}{$img} ne |
$changes{$role}{'showlogo'}{$img} = 1; |
$domconfig->{$role}{'showlogo'}{$img}) { |
|
$changes{$role}{'showlogo'}{$img} = 1; |
|
} |
|
} else { |
|
if ($confhash->{$role}{'showlogo'}{$img} == 0) { |
|
$changes{$role}{'showlogo'}{$img} = 1; |
|
} |
} |
} |
} else { |
} |
if ($confhash->{$role}{'showlogo'}{$img} == 0) { |
if ($img ne 'login') { |
$changes{$role}{'showlogo'}{$img} = 1; |
if (ref($domconfig->{$role}{'alttext'}) eq 'HASH') { |
|
if ($confhash->{$role}{'alttext'}{$img} ne |
|
$domconfig->{$role}{'alttext'}{$img}) { |
|
$changes{$role}{'alttext'}{$img} = 1; |
|
} |
|
} else { |
|
if ($confhash->{$role}{'alttext'}{$img} ne '') { |
|
$changes{$role}{'alttext'}{$img} = 1; |
|
} |
} |
} |
} |
} |
} |
} |
Line 13056 sub default_change_checker {
|
Line 13094 sub default_change_checker {
|
if ($confhash->{$role}{'showlogo'}{$img} == 0) { |
if ($confhash->{$role}{'showlogo'}{$img} == 0) { |
$changes->{$role}{'showlogo'}{$img} = 1; |
$changes->{$role}{'showlogo'}{$img} = 1; |
} |
} |
|
if (ref($confhash->{$role}{'alttext'}) eq 'HASH') { |
|
if ($confhash->{$role}{'alttext'}{$img} ne '') { |
|
$changes->{$role}{'alttext'}{$img} = 1; |
|
} |
|
} |
} |
} |
} |
} |
if ($confhash->{$role}{'font'}) { |
if ($confhash->{$role}{'font'}) { |
Line 13094 sub display_colorchgs {
|
Line 13137 sub display_colorchgs {
|
} else { |
} else { |
$resulttext .= '<li>'.&mt("$choices{$item} set to not be displayed").'</li>'; |
$resulttext .= '<li>'.&mt("$choices{$item} set to not be displayed").'</li>'; |
} |
} |
|
} elsif (($role eq 'login') && ($key eq 'alttext')) { |
|
if ($confhash->{$role}{$key}{$item} ne '') { |
|
$resulttext .= '<li>'.&mt("$choices{$key} for $choices{$item} set to [_1].", |
|
$confhash->{$role}{$key}{$item}).'</li>'; |
|
} else { |
|
$resulttext .= '<li>'.&mt("$choices{$key} for $choices{$item} deleted.").'</li>'; |
|
} |
} elsif ($confhash->{$role}{$item} eq '') { |
} elsif ($confhash->{$role}{$item} eq '') { |
$resulttext .= '<li>'.&mt("$choices{$item} set to default").'</li>'; |
$resulttext .= '<li>'.&mt("$choices{$item} set to default").'</li>'; |
} else { |
} else { |
Line 16000 sub modify_autoenroll {
|
Line 16050 sub modify_autoenroll {
|
my $failsafe = $env{'form.autoenroll_failsafe'}; |
my $failsafe = $env{'form.autoenroll_failsafe'}; |
unless (($failsafe eq 'zero') || ($failsafe eq 'any')) { |
unless (($failsafe eq 'zero') || ($failsafe eq 'any')) { |
$failsafe = 'off'; |
$failsafe = 'off'; |
undef($autofailsafe); |
undef($autofailsafe); |
} |
} |
my %autoenrollhash = ( |
my %autoenrollhash = ( |
autoenroll => { 'run' => $env{'form.autoenroll_run'}, |
autoenroll => { 'run' => $env{'form.autoenroll_run'}, |
Line 16008 sub modify_autoenroll {
|
Line 16058 sub modify_autoenroll {
|
'sender_domain' => $sender_domain, |
'sender_domain' => $sender_domain, |
'co-owners' => $coowners, |
'co-owners' => $coowners, |
'autofailsafe' => $autofailsafe, |
'autofailsafe' => $autofailsafe, |
'failsafe' => $failsafe, |
'failsafe' => $failsafe, |
} |
} |
); |
); |
my $putresult = &Apache::lonnet::put_dom('configuration',\%autoenrollhash, |
my $putresult = &Apache::lonnet::put_dom('configuration',\%autoenrollhash, |
Line 21255 sub modify_wafproxy {
|
Line 21305 sub modify_wafproxy {
|
} |
} |
} |
} |
$output = &mt('Changes were made to Web Application Firewall/Reverse Proxy').'<ul>'; |
$output = &mt('Changes were made to Web Application Firewall/Reverse Proxy').'<ul>'; |
foreach my $item ('alias','remoteip','ipheader','trusted','vpnint','vpnext','sslopt') { |
foreach my $item ('alias','saml','remoteip','ipheader','trusted','vpnint','vpnext','sslopt') { |
if ($changes{$item}) { |
if ($changes{$item}) { |
if ($item eq 'alias') { |
if ($item eq 'alias') { |
my $numaliased = 0; |
my $numaliased = 0; |