--- loncom/auth/lonlogin.pm 2008/11/22 19:07:02 1.107 +++ loncom/auth/lonlogin.pm 2009/03/10 18:18:31 1.114 @@ -1,7 +1,7 @@ # The LearningOnline Network # Login Screen # -# $Id: lonlogin.pm,v 1.107 2008/11/22 19:07:02 tempelho Exp $ +# $Id: lonlogin.pm,v 1.114 2009/03/10 18:18:31 tempelho Exp $ # # Copyright Michigan State University Board of Trustees # @@ -102,15 +102,8 @@ sub handler { # ----------------------------------------------------------- Process Interface $env{'form.interface'}=~s/\W//g; - # my $textbrowsers=$r->dir_config('lonTextBrowsers'); my $httpbrowser=$ENV{"HTTP_USER_AGENT"}; - # foreach (split(/\:/,$textbrowsers)) { -# if ($httpbrowser=~/$_/i) { -# $env{'form.interface'}='textual'; -# } -# } - my $fullgraph=($env{'form.interface'} ne 'textual'); my $iconpath= @@ -253,12 +246,6 @@ my $vlink= my $alink=&Apache::loncommon::designparm('login.alink',$domain); my $mainbg= ($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); @@ -266,6 +253,14 @@ my $login=&Apache::loncommon::designparm if ($login eq '') { $login = $iconpath.'/'.&mt('userauthentication.gif'); } +my $showbanner = 1; +my $showmainlogo = 1; +if (defined(&Apache::loncommon::designparm('login.showlogo_img',$domain))) { + $showbanner = &Apache::loncommon::designparm('login.showlogo_img',$domain); +} +if (defined(&Apache::loncommon::designparm('login.showlogo_logo',$domain))) { + $showmainlogo = &Apache::loncommon::designparm('login.showlogo_logo',$domain); +} my $showadminmail=&Apache::loncommon::designparm('login.adminmail',$domain); my $showcoursecat = &Apache::loncommon::designparm('login.coursecatalog',$domain); @@ -311,7 +306,7 @@ my %add_entries = (topmargin => "0", leftmargin => "0", marginheight => "0", marginwidth => "0", - bgcolor => "$pgbg", + bgcolor => "$mainbg", text => "$font", link => "$link", vlink => "$vlink", @@ -340,13 +335,7 @@ my %lt=&Apache::lonlocal::texthash( 'helpdesk' => 'Contact Helpdesk', 'forgotpw' => 'Forgot password?', 'newuser' => 'New User?', - 'options_headline' => 'Select Accessibility Options', - 'sprs_img' => 'Suppress rendering of images', - 'sprs_applet' => 'Suppress Java applets', - 'sprs_embed' => 'Suppress rendering of embedded multimedia', - 'sprs_font' => 'Increase font size', - 'sprs_blackwhite' => 'Switch to black and white mode', - 'remember' => 'Remember these settings for next login'); + ); # -------------------------------------------------- Change password field name my $forgotpw = &forgotpwdisplay(%lt); my $loginhelp = &loginhelpdisplay(%lt); @@ -376,124 +365,126 @@ $r->print(< ENDSERVERFORM - my $coursecatalog; - if (($showcoursecat eq '') || ($showcoursecat)) { - $coursecatalog = &coursecatalog_link($lt{'catalog'}); - } - my $newuserlink; - if ($shownewuserlink) { - $newuserlink = &newuser_link($lt{'newuser'}); - } - my $logintitle; - if ($loginheader eq 'text') { - $logintitle = $lt{'log'}; - } else { - $logintitle = ''; - } - - my $noscript_warning='' - .&mt('Use of LON-CAPA requires Javascript to be enabled in your web browser.') - .''; - my $helpdeskscript; - my $contactblock = &contactdisplay(\%lt,$servadm,$showadminmail, - $version,$authdomain,\$helpdeskscript); - - if ($fullgraph) { - $r->print(< - - - - - +my $coursecatalog; +if (($showcoursecat eq '') || ($showcoursecat)) { + $coursecatalog = &coursecatalog_link($lt{'catalog'}); +} +my $newuserlink; +if ($shownewuserlink) { + $newuserlink = &newuser_link($lt{'newuser'}).''; +} +my $logintitle; +if ($loginheader eq 'text') { + $logintitle =''.$lt{'log'}.''; +} else { + $logintitle = ''; +} - - - -$logintitle - - - $domainlogo - -ENDTOP - -$r->print(''); +my $noscript_warning='' + .&mt('Use of LON-CAPA requires Javascript to be enabled in your web browser.') + .''; +my $helpdeskscript; +my $contactblock = &contactdisplay(\%lt,$servadm,$showadminmail, + $version,$authdomain,\$helpdeskscript); + +my $loginform=(< + + + $lt{'un'}: + + $lt{'pw'}: + + $lt{'dom'}: + + + +LFORM -$r->print(< - - $lt{'un'}: - - $lt{'pw'}: - - $lt{'dom'}: - - - - - - -$noscript_warning - +if ($fullgraph) { + if ($showbanner) { + $r->print(< + + + + + + + +HEADER + } + if ($showmainlogo) { + $r->print(' '."\n". + ' '."\n"); + } + $r->print(<$domainlogo + + $logintitle + + + + $loginform + + + + $noscript_warning + $loginhelp - $forgotpw - $newuserlink + $forgotpw + $contactblock + $newuserlink $coursecatalog - $lt{'about'} - $helpdeskscript + $lt{'about'} + $announcements -ENDTOPP +ENDTOP } -if($announcements){$r->print(' ');} - - if ($fullgraph) { - - $r->print(<print(' ');} +if ($fullgraph) { +$r->print(< - + $lt{'dom'}: - + $domain - + $lt{'serv'}: - + $lonhost ($role) - + $lt{'load'}: - + $loadpercent $lt{'perc'} - + $lt{'userload'}: - + $userloadpercent $lt{'perc'} - - $contactblock -