version 1.113, 2009/10/08 22:37:33
|
version 1.116, 2009/10/23 16:14:43
|
Line 634 sub print_login {
|
Line 634 sub print_login {
|
if ($disallowed{$lonhost} eq '') { |
if ($disallowed{$lonhost} eq '') { |
$direct = ''; |
$direct = ''; |
} |
} |
$datatable .= '<tr><td>'.$lonhost.'</td>'. |
$datatable .= '<tr><td>'.$servers{$lonhost}.'</td>'. |
'<td><select name="'.$lonhost.'_serverurl">'. |
'<td><select name="'.$lonhost.'_serverurl">'. |
'<option value=""'.$direct.'>'.$choices{'directlogin'}. |
'<option value=""'.$direct.'>'.$choices{'directlogin'}. |
'</option>'; |
'</option>'; |
foreach my $hostid (keys(%servers)) { |
foreach my $hostid (keys(%servers)) { |
next if ($hostid eq $lonhost); |
next if ($servers{$hostid} eq $servers{$lonhost}); |
my $selected = ''; |
my $selected = ''; |
if ($hostid eq $disallowed{$lonhost}) { |
if ($hostid eq $disallowed{$lonhost}) { |
$selected = 'selected="selected"'; |
$selected = 'selected="selected"'; |
Line 657 sub print_login {
|
Line 657 sub print_login {
|
'coursecatalog' => 'on', |
'coursecatalog' => 'on', |
'adminmail' => 'off', |
'adminmail' => 'off', |
'newuser' => 'off', |
'newuser' => 'off', |
|
'submitbugs' => 'on', |
); |
); |
my @toggles = ('coursecatalog','adminmail','newuser'); |
my @toggles = ('coursecatalog','adminmail','newuser','submitbugs'); |
my (%checkedon,%checkedoff); |
my (%checkedon,%checkedoff); |
foreach my $item (@toggles) { |
foreach my $item (@toggles) { |
if ($defaultchecked{$item} eq 'on') { |
if ($defaultchecked{$item} eq 'on') { |
Line 787 sub print_login {
|
Line 788 sub print_login {
|
sub login_choices { |
sub login_choices { |
my %choices = |
my %choices = |
&Apache::lonlocal::texthash ( |
&Apache::lonlocal::texthash ( |
coursecatalog => 'Display Course Catalog link?', |
coursecatalog => 'Display Course/Community Catalog link?', |
adminmail => "Display Administrator's E-mail Address?", |
adminmail => "Display Administrator's E-mail Address?", |
disallowlogin => "Login page requests redirected", |
disallowlogin => "Login page requests redirected", |
|
submitbugs => "Display "Submit Bug" link?", |
hostid => "Server", |
hostid => "Server", |
serverurl => "Redirect to log-in via:", |
serverurl => "Redirect to log-in via:", |
directlogin => "No redirect", |
directlogin => "No redirect", |
Line 3137 sub modify_login {
|
Line 3139 sub modify_login {
|
my %title = ( coursecatalog => 'Display course catalog', |
my %title = ( coursecatalog => 'Display course catalog', |
adminmail => 'Display administrator E-mail address', |
adminmail => 'Display administrator E-mail address', |
newuser => 'Link for visitors to create a user account', |
newuser => 'Link for visitors to create a user account', |
|
submitbugs => 'Link for users to submit a bug', |
loginheader => 'Log-in box header'); |
loginheader => 'Log-in box header'); |
my @offon = ('off','on'); |
my @offon = ('off','on'); |
my %curr_loginvia; |
my %curr_loginvia; |
Line 3150 sub modify_login {
|
Line 3153 sub modify_login {
|
my %loginhash; |
my %loginhash; |
($errors,%colchanges) = &modify_colors($r,$dom,$confname,['login'], |
($errors,%colchanges) = &modify_colors($r,$dom,$confname,['login'], |
\%domconfig,\%loginhash); |
\%domconfig,\%loginhash); |
my @toggles = ('coursecatalog','adminmail','newuser'); |
my @toggles = ('coursecatalog','adminmail','newuser','submitbugs'); |
foreach my $item (@toggles) { |
foreach my $item (@toggles) { |
$loginhash{login}{$item} = $env{'form.'.$item}; |
$loginhash{login}{$item} = $env{'form.'.$item}; |
} |
} |
Line 3180 sub modify_login {
|
Line 3183 sub modify_login {
|
my $putresult = &Apache::lonnet::put_dom('configuration',\%loginhash, |
my $putresult = &Apache::lonnet::put_dom('configuration',\%loginhash, |
$dom); |
$dom); |
if ($putresult eq 'ok') { |
if ($putresult eq 'ok') { |
my @toggles = ('coursecatalog','adminmail','newuser'); |
my @toggles = ('coursecatalog','adminmail','newuser','submitbugs'); |
my %defaultchecked = ( |
my %defaultchecked = ( |
'coursecatalog' => 'on', |
'coursecatalog' => 'on', |
'adminmail' => 'off', |
'adminmail' => 'off', |
'newuser' => 'off', |
'newuser' => 'off', |
|
'submitbugs' => 'on', |
); |
); |
if (ref($domconfig{'login'}) eq 'HASH') { |
if (ref($domconfig{'login'}) eq 'HASH') { |
foreach my $item (@toggles) { |
foreach my $item (@toggles) { |