[LON-CAPA-cvs] cvs: loncom /auth lonlogin.pm /html/adm/lonDomColors default.tab /interface domainprefs.pm loncommon.pm

raeburn lon-capa-cvs-allow@mail.lon-capa.org
Wed, 16 Jan 2008 20:42:53 -0000


This is a MIME encoded message

--raeburn1200516173
Content-Type: text/plain

raeburn		Wed Jan 16 15:42:53 2008 EDT

  Modified files:              
    /loncom/auth	lonlogin.pm 
    /loncom/interface	domainprefs.pm loncommon.pm 
    /loncom/html/adm/lonDomColors	default.tab 
  Log:
  Bug 5577.
  
  domainprefs.pm
  - On log-in page, log-in box can use either an image or text.  DC can choose which of these to use, and override default image and text color and background.
  - javascript functions - colchg_span() and get_id() added to support dhtml-driven change of colors in square boxes used for legend for background colors, when new colors are chosen from the color picker
  - &Apache::loncommon::devalidate_domconfig_cache() called in more cases when configuration changes have been made for a domain.
  
  lonlogin.pm
  - replace html tags for start end end of page with loncommon::start_page() and loncommon::end_page()
  - log-in box can use either an image (e.g., userauthentication.gif) or text (configurable by DC via "Domain Configuration")
  
  loncommon.pm
  -  &designparm() will retrieve settings for log-in box header on log-in page: image, text color, and background color.
  - &endbodytag() can take an optional argument (a ref to a hash) which if key of noredirectlink is true in the hash will suppress display of a 'Continue' link in the case where the $env{'internal.head.redirect'} exists.
  
  default.tab
  - new parameters added for default log-in box header - a default image, and default colors for text and background.
  
  
--raeburn1200516173
Content-Type: text/plain
Content-Disposition: attachment; filename="raeburn-20080116154253.txt"

Index: loncom/auth/lonlogin.pm
diff -u loncom/auth/lonlogin.pm:1.97 loncom/auth/lonlogin.pm:1.98
--- loncom/auth/lonlogin.pm:1.97	Tue Oct  9 12:27:08 2007
+++ loncom/auth/lonlogin.pm	Wed Jan 16 15:42:44 2008
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Login Screen
 #
-# $Id: lonlogin.pm,v 1.97 2007/10/09 16:27:08 albertel Exp $
+# $Id: lonlogin.pm,v 1.98 2008/01/16 20:42:44 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -235,20 +235,6 @@
 # ----------------------------------------------- Apparently we are in business
     $servadm=~s/\,/\<br \/\>/g;
 
-# --------------------------------------------------- Print login screen header
-    $r->print(<<ENDHEADER);
-<html>
-<head>
-<meta HTTP-EQUIV="Refresh" CONTENT="$expire; url=/adm/roles" />
-<title>The LearningOnline Network with CAPA Login</title>
-</head>
-ENDHEADER
-# ---------------------------------------------------- Serve out DES JavaScript
-    {
-	my $jsh=Apache::File->new($include."/londes.js");
-        $r->print(<$jsh>);
-    }
-
 # ----------------------------------------------------------- Front page design
     my $pgbg=
       ($fullgraph?&Apache::loncommon::designparm('login.pgbg',$domain):'#FFFFFF');
@@ -263,47 +249,28 @@
       ($fullgraph?&Apache::loncommon::designparm('login.mainbg',$domain):'#FFFFFF');
     my $sidebg=
       ($fullgraph?&Apache::loncommon::designparm('login.sidebg',$domain):'#FFFFFF');
+    my $textcol = 
+      ($fullgraph?&Apache::loncommon::designparm('login.textcol',$domain):'#000000');
+    my $bgcol =
+      ($fullgraph?&Apache::loncommon::designparm('login.bgcol',$domain):'#FFFFFF');
     my $logo=&Apache::loncommon::designparm('login.logo',$domain);
     my $img=&Apache::loncommon::designparm('login.img',$domain);
     my $domainlogo=&Apache::loncommon::domainlogo($domain);
-    my $showadminmail=&Apache::loncommon::designparm('login.adminmail',                                                      $domain);
+    my $login=&Apache::loncommon::designparm('login.login',$domain);
+    if ($login eq '') {
+        $login = $iconpath.'/'.&mt('userauthentication.gif');
+    }
+    my $showadminmail=&Apache::loncommon::designparm('login.adminmail',$domain);
     my $showcoursecat =
         &Apache::loncommon::designparm('login.coursecatalog',$domain);
-
-
-# ----------------------------------------------------------------------- Texts
-
-my %lt=&Apache::lonlocal::texthash(
-		  'un'  => 'Username',
-		  'pw'  => 'Password',
-		  'dom' => 'Domain',
-		  'perc' => 'percent',
-		  'load' => 'Load',
-                  'userload' => 'User Load',
-                  'about'  => 'About LON-CAPA',
-                  'access' => 'Accessibility Options',
-                  'catalog' => 'Course Catalog',
-		  'auth' => 'userauthentication.gif',
-		  'log' => 'Log in',
-		  'help' => 'Log-in Help',
-		  'serv' => 'Server',
-                  'servadm' => 'Server Administration',
-                  'helpdesk' => 'Contact Helpdesk',
-                  'forgotpw' => 'Forgot password?');
-# -------------------------------------------------- Change password field name
+    my $loginheader =&Apache::loncommon::designparm('login.loginheader',$domain);
     my $now=time;
-    my $forgotpw = &forgotpwdisplay(%lt);
-    my $loginhelp = &loginhelpdisplay(%lt);
-# ---------------------------------------------------------- Serve rest of page
-    $r->print(<<ENDSCRIPT);
-
-<body bgcolor="$pgbg" text="$font" link="$link" vlink="$vlink" alink="$alink"
-  topmargin=0 leftmargin=0 marginwidth=0 marginheight=0>
+    my $js = (<<ENDSCRIPT);
 
  <script language="JavaScript">
     function send()
     {
-	this.document.server.elements.uname.value
+        this.document.server.elements.uname.value
        =this.document.client.elements.uname.value;
 
         this.document.server.elements.udom.value
@@ -332,21 +299,68 @@
         initkeys();
 
         this.document.server.elements.upass0.value
-	    =crypted(this.document.client.elements.upass$now.value.substr(0,15));
-	this.document.server.elements.upass1.value
-	    =crypted(this.document.client.elements.upass$now.value.substr(15,15));
-	this.document.server.elements.upass2.value
-	    =crypted(this.document.client.elements.upass$now.value.substr(30,15));
+            =crypted(this.document.client.elements.upass$now.value.substr(0,15));
+        this.document.server.elements.upass1.value
+            =crypted(this.document.client.elements.upass$now.value.substr(15,15));
+        this.document.server.elements.upass2.value
+            =crypted(this.document.client.elements.upass$now.value.substr(30,15));
 
         this.document.client.elements.uname.value='';
         this.document.client.elements.upass$now.value='';
 
         this.document.server.submit();
-	return false;
+        return false;
     }
  </script>
+
 ENDSCRIPT
 
+# --------------------------------------------------- Print login screen header
+
+    my %add_entries = (topmargin    => "0",
+                       leftmargin   => "0",
+                       marginheight => "0",
+                       marginwidth  => "0",
+                       bgcolor      => "$pgbg",
+                       text         => "$font",
+                       link         => "$link",
+                       vlink        => "$vlink",
+                       alink        => "$alink",);
+
+    $r->print(&Apache::loncommon::start_page('The LearningOnline Network with CAPA Login',$js,
+                                       { 'redirect'       => [$expire,'/adm/roles'], 
+                                         'add_entries' => \%add_entries,
+                                         'only_body'   => 1,}));
+
+# ----------------------------------------------------------------------- Texts
+
+my %lt=&Apache::lonlocal::texthash(
+		  'un'  => 'Username',
+		  'pw'  => 'Password',
+		  'dom' => 'Domain',
+		  'perc' => 'percent',
+		  'load' => 'Load',
+                  'userload' => 'User Load',
+                  'about'  => 'About LON-CAPA',
+                  'access' => 'Accessibility Options',
+                  'catalog' => 'Course Catalog',
+		  'log' => 'Log in',
+		  'help' => 'Log-in Help',
+		  'serv' => 'Server',
+                  'servadm' => 'Server Administration',
+                  'helpdesk' => 'Contact Helpdesk',
+                  'forgotpw' => 'Forgot password?');
+# -------------------------------------------------- Change password field name
+    my $forgotpw = &forgotpwdisplay(%lt);
+    my $loginhelp = &loginhelpdisplay(%lt);
+
+# ---------------------------------------------------- Serve out DES JavaScript
+    {
+        my $jsh=Apache::File->new($include."/londes.js");
+        $r->print(<$jsh>);
+    }
+# ---------------------------------------------------------- Serve rest of page
+
     if ($fullgraph) {
 	$r->print(
 		  '<table width="100%" cellpadding=0 cellspacing=0 border=0>');
@@ -463,13 +477,20 @@
 <input type="hidden" name="remember"  value="" />
 ENDNOOPT
 }
+    my $logintitle;
+    if ($loginheader eq 'text') {
+        $logintitle = '<td bgcolor="'.$bgcol.'" colspan="2">&nbsp;&nbsp;&nbsp;<b><font size="+1" color="'.$textcol.'">'.$lt{'log'}.'</font></b></td>';
+    } else {
+        $logintitle = '<td bgcolor="'.$sidebg.'" colspan="2"><img src="'.$login.'" alt="'.
+                      &mt('User Authentication').'" /></td>';
+    }
     $r->print(<<ENDLOGIN);
      <input type="hidden" name="lextkey" value="$lextkey">
      <input type="hidden" name="uextkey" value="$uextkey">
 
      <!-- Start the sub-table for text and input alignment -->
      <table border=0 cellspacing=0 cellpadding=0>
-      <tr><td bgcolor="$sidebg" colspan=2><img src="$iconpath/$lt{'auth'}" alt="User Authentication" /></td></tr>
+      <tr>$logintitle</tr>
       <tr>
        <td bgcolor="$mainbg"><br /><font size=-1><b>&nbsp;&nbsp;&nbsp;<label for="uname">$lt{'un'}</label>:</b></font></td>
        <td bgcolor="$mainbg"><br /><input type="text" name="uname" size="10" value="$authusername" /></td>
@@ -593,7 +614,8 @@
 
 ENDDOCUMENT
 }
-    $r->print('</body></html>');
+    my %endargs = ( 'noredirectlink' => 1, );
+    $r->print(&Apache::loncommon::end_page(\%endargs));
     return OK;
 }
 
Index: loncom/interface/domainprefs.pm
diff -u loncom/interface/domainprefs.pm:1.40 loncom/interface/domainprefs.pm:1.41
--- loncom/interface/domainprefs.pm:1.40	Fri Jan  4 12:47:51 2008
+++ loncom/interface/domainprefs.pm	Wed Jan 16 15:42:48 2008
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to set domain-wide configuration settings
 #
-# $Id: domainprefs.pm,v 1.40 2008/01/04 17:47:51 raeburn Exp $
+# $Id: domainprefs.pm,v 1.41 2008/01/16 20:42:48 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -247,7 +247,7 @@
             my @ids=&Apache::lonnet::current_machine_ids();
             if (!grep(/^\Q$primarylibserv\E$/,@ids)) {
                 my %designhash = &Apache::loncommon::get_domainconf($dom);
-                my @loginimages = ('img','logo','domlogo');
+                my @loginimages = ('img','logo','domlogo','login');
                 my $custom_img_count = 0;
                 foreach my $img (@loginimages) {
                     if ($designhash{$dom.'.login.'.$img} ne '') {
@@ -568,10 +568,12 @@
 sub print_login {
     my ($dom,$confname,$phase,$settings,$rowtotal) = @_;
     my %choices = &login_choices();
-    my ($catalogon,$catalogoff,$adminmailon,$adminmailoff);
+    my ($catalogon,$catalogoff,$adminmailon,$adminmailoff,$loginheader);
     $catalogon = ' checked="checked" ';
     $adminmailoff = ' checked="checked" ';
-    my @images = ('img','logo','domlogo');
+    $loginheader = 'image';
+    my @images = ('img','logo','domlogo','login');
+    my @logintext = ('textcol','bgcol');
     my @bgs = ('pgbg','mainbg','sidebg');
     my @links = ('link','alink','vlink');
     my %designhash = &Apache::loncommon::get_domainconf($dom);
@@ -586,6 +588,9 @@
     foreach my $item (@bgs) {
         $defaults{'bgs'}{$item} = $defaultdesign{'login.'.$item};
     }
+    foreach my $item (@logintext) {
+        $defaults{'logintext'}{$item} = $defaultdesign{'login.'.$item};
+    }
     foreach my $item (@links) {
         $defaults{'links'}{$item} = $defaultdesign{'login.'.$item};
     }
@@ -604,6 +609,15 @@
                 $is_custom{$item} = 1;
             }
         }
+        foreach my $item (@logintext) {
+            if ($settings->{$item} ne '') {
+                $designs{'logintext'}{$item} = $settings->{$item};
+                $is_custom{$item} = 1;
+            }
+        }
+        if ($settings->{'loginheader'} ne '') {
+            $loginheader = $settings->{'loginheader'};
+        }
         if ($settings->{'font'} ne '') {
             $designs{'font'} = $settings->{'font'};
             $is_custom{'font'} = 1;
@@ -646,7 +660,8 @@
     }
     my %alt_text = &Apache::lonlocal::texthash  ( img => 'Log-in banner',
                                                   logo => 'Institution Logo',
-                                                  domlogo => 'Domain Logo');
+                                                  domlogo => 'Domain Logo',
+                                                  login => 'Login box');
     my $itemcount = 1;
     my $css_class = $itemcount%2?' class="LC_odd_row"':'';
     my $datatable = 
@@ -667,7 +682,7 @@
         '<label><input type="radio" name="adminmail"'.
         $adminmailoff.'value="0" />'.&mt('No').'</label></span></td></tr>';
     $itemcount ++;
-    $datatable .= &display_color_options($dom,$confname,$phase,'login',$itemcount,\%choices,\%is_custom,\%defaults,\%designs,\@images,\@bgs,\@links,\%alt_text,$rowtotal);
+    $datatable .= &display_color_options($dom,$confname,$phase,'login',$itemcount,\%choices,\%is_custom,\%defaults,\%designs,\@images,\@bgs,\@links,\%alt_text,$rowtotal,\@logintext,$loginheader);
     $datatable .= '</tr></table></td></tr>';
     return $datatable;
 }
@@ -680,6 +695,9 @@
             img => "Header",
             logo => "Main Logo",
             domlogo => "Domain Logo",
+            login => "Log-in Header", 
+            textcol => "Text color",
+            bgcol   => "Box color",
             bgs => "Background colors",
             links => "Link colors",
             font => "Font color",
@@ -767,7 +785,7 @@
 
 sub display_color_options {
     my ($dom,$confname,$phase,$role,$itemcount,$choices,$is_custom,$defaults,$designs,
-        $images,$bgs,$links,$alt_text,$rowtotal) = @_;
+        $images,$bgs,$links,$alt_text,$rowtotal,$logintext,$loginheader) = @_;
     my $css_class = $itemcount%2?' class="LC_odd_row"':'';
     my $datatable = '<tr'.$css_class.'>'.
         '<td>'.$choices->{'font'}.'</td>';
@@ -789,13 +807,19 @@
         $css_class = $itemcount%2?' class="LC_odd_row"':'';
         $datatable .= '<tr'.$css_class.'>'.
                       '<td>'.$choices->{$img}.'</td>';
-        my ($imgfile, $img_import);
+        my ($imgfile,$img_import,$login_hdr_pick,$logincolors);
         if ($designs->{$img} ne '') {
             $imgfile = $designs->{$img};
 	    $img_import = ($imgfile =~ m{^/adm/});
         } else {
             $imgfile = $defaults->{$img};
         }
+        if ($img eq 'login') {
+            $login_hdr_pick = &login_header_options($img,$role,$defaults,$is_custom,$choices,
+                                                    $loginheader);
+            $logincolors =
+                &login_text_colors($img,$role,$logintext,$phase,$choices,$designs);
+        }
         if ($imgfile) {
             my ($showfile,$fullsize);
             if ($imgfile =~ m-^(/res/\Q$dom\E/\Q$confname\E/\Q$img\E)/([^/]+)$-) {
@@ -856,23 +880,12 @@
                         $fullsize = $imgfile;
                     }
                 }
-                $datatable.= '<td>';
-                if (!$is_custom->{$img}) {
-                    $datatable .= &mt('Default in use:').'<br />';
-                }
-		if ($img_import) {
-		    $datatable.= '<input type="hidden" name="'.$role.'_import_'.$img.'" value="'.$imgfile.'" />';
-		}
-                $datatable.= '<a href="'.$fullsize.'" target="_blank"><img src="'.
-                             $showfile.'" alt="'.$alt_text->{$img}.
-                             '" border="0" /></a></td>';
-                if ($is_custom->{$img}) {
-                    $datatable.='<td><span class="LC_nobreak"><label><input type="checkbox" name="'.
-                                $role.'_del_'.$img.'" value="1" />'.&mt('Delete?').
-                                '</label>&nbsp;'.&mt('Replace:').'</span><br />';
-                } else {
-                    $datatable.='<td valign="bottom">'.&mt('Upload:').'<br />';
+                $datatable .= '<td>';
+                if ($img eq 'login') {
+                    $datatable .= $login_hdr_pick;    
                 }
+                $datatable .= &image_changes($is_custom->{$img},$alt_text->{$img},$img_import,
+                                             $showfile,$fullsize,$role,$img,$imgfile,$logincolors);
             } else {
                 $datatable .= '<td colspan="2" class="LC_right_item"><br />'.
                               &mt('Upload:');
@@ -912,7 +925,7 @@
             $datatable .= '&nbsp;<span id="css_'.$role.'_'.$item.'" style="background-color: '.$designs->{'bgs'}{$item}.';">&nbsp;&nbsp;&nbsp;</span>';
         }
         $datatable .= '<br /><input type="text" size="8" name="'.$role.'_'.$item.'" value="'.$designs->{'bgs'}{$item}.
-                      '" onblur = "javascript:document.display.css_'.$role.'_'.$item.'.style.background-color = document.display.'.$role.'_'.$item.'.value;"/></td>';
+                      '" onblur = "javascript:colchg_span('."'css_".$role.'_'.$item."'".',this);" /></td>';
     }
     $datatable .= '</tr></table></td></tr>';
     $itemcount ++;
@@ -946,6 +959,79 @@
     return $datatable;
 }
 
+sub login_header_options  {
+    my ($img,$role,$defaults,$is_custom,$choices,$loginheader) = @_;
+    my $image_checked = ' checked="checked" ';
+    my $text_checked = ' ';
+    if ($loginheader eq 'text') {
+        $image_checked = ' ';
+        $text_checked = ' checked="checked" ';
+    }
+    my $output = '<span class="LC_nobreak"><label><input type="radio" name="'.
+              'loginheader" value="image" '.$image_checked.'/>'.
+              &mt('use image').'</label>&nbsp;&nbsp;&nbsp;'.
+              '<label><input type="radio" name="loginheader" value="text"'.
+              $text_checked.'/>'.&mt('use text').'</label><br />'."\n";
+    if ((!$is_custom->{'textcol'}) || (!$is_custom->{'bgcol'})) {
+        $output .= &mt('Text default(s)').':<br />';
+        if (!$is_custom->{'textcol'}) {
+            $output .= $choices->{'textcol'}.':&nbsp;'.$defaults->{'logintext'}{'textcol'}.
+                       '&nbsp;&nbsp;&nbsp;';
+        }
+        if (!$is_custom->{'bgcol'}) {
+            $output .= $choices->{'bgcol'}.':&nbsp;'.
+                       '<span id="css_'.$role.'_font" style="background-color: '.
+                       $defaults->{'logintext'}{'bgcol'}.';">&nbsp;&nbsp;&nbsp;</span>';
+        }
+        $output .= '<br />';
+    }
+    $output .='<br />';
+    return $output;
+}
+
+sub login_text_colors {
+    my ($img,$role,$logintext,$phase,$choices,$designs) = @_;
+    my $color_menu = '<table border="0"><tr>';
+    foreach my $item (@{$logintext}) {
+        my $link = &color_pick($phase,$role,$item,$choices->{$item},$designs->{'logintext'}{$item});
+        $color_menu .= '<td align="center">'.$link;
+        if ($designs->{'logintext'}{$item}) {
+            $color_menu .= '&nbsp;<span id="css_'.$role.'_'.$item.'" style="background-color: '.$designs->{'logintext'}{$item}.';">&nbsp;&nbsp;&nbsp;</span>';
+        }
+        $color_menu .= '<br /><input type="text" size="8" name="'.$role.'_'.$item.'" value="'.
+                       $designs->{'logintext'}{$item}.'" onblur = "javascript:colchg_span('."'css_".$role.'_'.$item."'".',this);" /></td>'.
+                       '<td>&nbsp;</td>';
+    }
+    $color_menu .= '</tr></table><br />';
+    return $color_menu;
+}
+
+sub image_changes {
+    my ($is_custom,$alt_text,$img_import,$showfile,$fullsize,$role,$img,$imgfile,$logincolors) = @_;
+    my $output;
+    if (!$is_custom) {
+        if ($img eq 'login') {
+            $output .= &mt('Default image:').'<br />';
+        } else {
+            $output .= &mt('Default in use:').'<br />';
+        }
+    }
+    if ($img_import) {
+        $output .= '<input type="hidden" name="'.$role.'_import_'.$img.'" value="'.$imgfile.'" />';
+    }
+    $output .= '<a href="'.$fullsize.'" target="_blank"><img src="'.
+               $showfile.'" alt="'.$alt_text.'" border="0" /></a></td>';
+    if ($is_custom) {
+        $output .= '<td>'.$logincolors.'<span class="LC_nobreak"><label>'.
+                   '<input type="checkbox" name="'.
+                   $role.'_del_'.$img.'" value="1" />'.&mt('Delete?').
+                   '</label>&nbsp;'.&mt('Replace:').'</span><br />';
+    } else {
+        $output .= '<td valign="bottom">'.$logincolors.&mt('Upload:').'<br />';
+    }
+    return $output;
+}
+
 sub color_pick {
     my ($phase,$role,$item,$desc,$curcol) = @_;
     my $link = '<a href="javascript:pjump('."'color_custom','".$desc.
@@ -977,6 +1063,25 @@
             document.parmform.pres_marker.value='';
         }
     }
+
+    function get_id (span_id) {
+	if (document.getElementById) {
+            return document.getElementById(span_id);
+        }
+	if (document.all) {
+            return document.all[span_id];
+        } 
+	return false;
+    }
+
+    function colchg_span (span_id_str,new_color_item) {
+	var span_ref = get_id(span_id_str);
+	if (span_ref.style) { span_ref = span_ref.style; }
+	span_ref.background = new_color_item.value;
+	span_ref.backgroundColor = new_color_item.value;
+	span_ref.bgColor = new_color_item.value;
+    }
+
 ENDCOL
     return $output;
 }
@@ -1795,13 +1900,15 @@
     my ($r,$dom,$confname,%domconfig) = @_;
     my ($resulttext,$errors,$colchgtext,%changes,%colchanges);
     my %title = ( coursecatalog => 'Display course catalog',
-                  adminmail => 'Display administrator E-mail address');
+                  adminmail => 'Display administrator E-mail address',
+                  loginheader => 'Log-in box header');
     my @offon = ('off','on');
     my %loginhash;
     ($errors,%colchanges) = &modify_colors($r,$dom,$confname,['login'],
                                            \%domconfig,\%loginhash);
     $loginhash{login}{coursecatalog} = $env{'form.coursecatalog'};
     $loginhash{login}{adminmail} = $env{'form.adminmail'};
+    $loginhash{login}{loginheader} = $env{'form.loginheader'};
     if (ref($colchanges{'login'}) eq 'HASH') {  
         $colchgtext = &display_colorchgs($dom,\%colchanges,['login'],
                                          \%loginhash);
@@ -1825,10 +1932,23 @@
                  ($env{'form.adminmail'} eq '1')) {
             $changes{'adminmail'} = 1;
         }
+        if (($domconfig{'login'}{'loginheader'} eq 'text') && 
+            ($env{'form.loginheader'} eq 'image')) {
+            $changes{'loginheader'} = 1;
+        } elsif (($domconfig{'login'}{'loginheader'} eq '' ||
+                  $domconfig{'login'}{'loginheader'} eq 'image') &&
+                 ($env{'form.loginheader'} eq 'text')) {
+            $changes{'loginheader'} = 1;
+        }
         if (keys(%changes) > 0 || $colchgtext) {
+            &Apache::loncommon::devalidate_domconfig_cache($dom);
             $resulttext = &mt('Changes made:').'<ul>';
             foreach my $item (sort(keys(%changes))) {
-                $resulttext .= '<li>'.&mt("$title{$item} set to $offon[$env{'form.'.$item}]").'</li>';
+                if ($item eq 'loginheader') {
+                    $resulttext .= '<li>'.&mt("$title{$item} set to $env{'form.loginheader'}").'</li>';
+                } else {
+                    $resulttext .= '<li>'.&mt("$title{$item} set to $offon[$env{'form.'.$item}]").'</li>';
+                }
             }
             $resulttext .= $colchgtext.'</ul>';
         } else {
@@ -1872,6 +1992,7 @@
                                              $dom);
     if ($putresult eq 'ok') {
         if (keys(%changes) > 0) {
+            &Apache::loncommon::devalidate_domconfig_cache($dom);
             $resulttext = &display_colorchgs($dom,\%changes,$roles,
                                              $rolehash{'rolecolors'});
         } else {
@@ -1893,22 +2014,24 @@
     my (%changes,%choices);
     my @bgs = ('pgbg','mainbg','sidebg');
     my @links = ('link','alink','vlink');
+    my @logintext;
     my @images;
     my $servadm = $r->dir_config('lonAdmEMail');
     my $errors;
     foreach my $role (@{$roles}) {
         if ($role eq 'login') {
             %choices = &login_choices();
+            @logintext = ('textcol','bgcol');
         } else {
             %choices = &color_font_choices();
         }
         if ($role eq 'login') {
-            @images = ('img','logo','domlogo');
+            @images = ('img','logo','domlogo','login');
         } else {
             @images = ('img');
         }
         $confhash->{$role}{'font'} = $env{'form.'.$role.'_font'};
-        foreach my $item (@bgs,@links) {
+        foreach my $item (@bgs,@links,@logintext) {
             $confhash->{$role}{$item} = $env{'form.'.$role.'_'.$item};
         }
         my ($configuserok,$author_ok,$switchserver,%currroles);
@@ -2032,20 +2155,31 @@
                         }
                     }
                 }
+                foreach my $item (@logintext) {
+                    if ($domconfig->{$role}{$item} ne '') {
+                        if ($confhash->{$role}{$item} ne $domconfig->{$role}{$item}) {
+                            $changes{$role}{'logintext'}{$item} = 1;
+                        }
+                    } else {
+                        if ($confhash->{$role}{$item}) {
+                            $changes{$role}{'logintext'}{$item} = 1;
+                        }
+                    }
+                }
             } else {
                 &default_change_checker($role,\@images,\@links,\@bgs,
-                                        $confhash,\%changes); 
+                                        \@logintext,$confhash,\%changes); 
             }
         } else {
             &default_change_checker($role,\@images,\@links,\@bgs,
-                                    $confhash,\%changes); 
+                                    \@logintext,$confhash,\%changes); 
         }
     }
     return ($errors,%changes);
 }
 
 sub default_change_checker {
-    my ($role,$images,$links,$bgs,$confhash,$changes) = @_;
+    my ($role,$images,$links,$bgs,$logintext,$confhash,$changes) = @_;
     foreach my $item (@{$links}) {
         if ($confhash->{$role}{$item}) {
             $changes->{$role}{'links'}{$item} = 1;
@@ -2056,6 +2190,11 @@
             $changes->{$role}{'bgs'}{$item} = 1;
         }
     }
+    foreach my $item (@{$logintext}) {
+        if ($confhash->{$role}{$item}) {
+            $changes->{$role}{'logintext'}{$item} = 1;
+        }
+    }
     foreach my $img (@{$images}) {
         if ($env{'form.'.$role.'_del_'.$img}) {
             $confhash->{$role}{$img} = '';
@@ -2070,7 +2209,6 @@
 sub display_colorchgs {
     my ($dom,$changes,$roles,$confhash) = @_;
     my (%choices,$resulttext);
-    &Apache::loncommon::devalidate_domconfig_cache($dom);
     if (!grep(/^login$/,@{$roles})) {
         $resulttext = &mt('Changes made:').'<br />';
     }
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.634 loncom/interface/loncommon.pm:1.635
--- loncom/interface/loncommon.pm:1.634	Tue Jan 15 11:53:27 2008
+++ loncom/interface/loncommon.pm	Wed Jan 16 15:42:48 2008
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.634 2008/01/15 16:53:27 www Exp $
+# $Id: loncommon.pm,v 1.635 2008/01/16 20:42:48 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -3791,10 +3791,10 @@
 sub designparm {
     my ($which,$domain)=@_;
     if ($env{'browser.blackwhite'} eq 'on') {
-	if ($which=~/\.(font|alink|vlink|link)$/) {
+	if ($which=~/\.(font|alink|vlink|link|textcol)$/) {
 	    return '#000000';
 	}
-	if ($which=~/\.(pgbg|sidebg)$/) {
+	if ($which=~/\.(pgbg|sidebg|bgcol)$/) {
 	    return '#FFFFFF';
 	}
 	if ($which=~/\.tabbg$/) {
@@ -3813,7 +3813,7 @@
         $output = $defaultdesign{$which};
     }
     if (($which =~ /^(student|coordinator|author|admin)\.img$/) ||
-        ($which =~ /login\.(img|logo|domlogo)/)) {
+        ($which =~ /login\.(img|logo|domlogo|login)/)) {
         if ($output =~ m{^/(adm|res)/}) {
 	    if ($output =~ m{^/res/}) {
 		my $local_name = &Apache::lonnet::filelocation('',$output);
@@ -4130,18 +4130,25 @@
 
 Returns a uniform footer for LON-CAPA web pages.
 
-Inputs: none
+Inputs: 1 - optional reference to an args hash
+If in the hash, key for noredirectlink has a value which evaluates to true,
+a 'Continue' link is not displayed if the page contains an
+internal redirect in the <head></head> section,
+i.e., $env{'internal.head.redirect'} exists   
 
 =cut
 
 sub endbodytag {
+    my ($args) = @_;
     my $endbodytag='</body>';
     $endbodytag=&Apache::lontexconvert::jsMath_process()."\n".$endbodytag;
     if ( exists( $env{'internal.head.redirect'} ) ) {
-	$endbodytag=
-	    "<br /><a href=\"$env{'internal.head.redirect'}\">".
-	    &mt('Continue').'</a>'.
-	    $endbodytag;
+        if (!(ref($args) eq 'HASH' && $args->{'noredirectlink'})) {
+	    $endbodytag=
+	        "<br /><a href=\"$env{'internal.head.redirect'}\">".
+	        &mt('Continue').'</a>'.
+	        $endbodytag;
+        }
     }
     return $endbodytag;
 }
@@ -5512,7 +5519,7 @@
     if ($args->{'frameset'}) {
 	$result .= '</frameset>';
     } else {
-	$result .= &endbodytag();
+	$result .= &endbodytag($args);
     }
     $result .= "\n</html>";
 
Index: loncom/html/adm/lonDomColors/default.tab
diff -u loncom/html/adm/lonDomColors/default.tab:1.11 loncom/html/adm/lonDomColors/default.tab:1.12
--- loncom/html/adm/lonDomColors/default.tab:1.11	Tue Jul 24 20:38:39 2007
+++ loncom/html/adm/lonDomColors/default.tab	Wed Jan 16 15:42:53 2008
@@ -1,5 +1,7 @@
 login.img=/adm/lonIcons/header.gif
 login.logo=/adm/lonIcons/loncapalogo.gif
+login.login=/adm/lonIcons/userauthentication.gif
+login.loginheader=image
 login.pgbg=#006600
 login.mainbg=#FFFFFF
 login.sidebg=#CCCCCC
@@ -7,6 +9,8 @@
 login.vlink=#999999
 login.alink=#CC0000
 login.font=#000000
+login.textcol=#CCCCCC
+login.bgcol=#006600
 admin.img=/adm/lonInterFace/admin.jpg
 admin.pgbg=#FFFFFF
 admin.tabbg=#CCCC99

--raeburn1200516173--