[LON-CAPA-cvs] cvs: loncom(version_2_9_X) /auth lonlogin.pm
raeburn
raeburn@source.lon-capa.org
Mon, 18 May 2009 12:59:48 -0000
raeburn Mon May 18 12:59:48 2009 EDT
Modified files: (Branch: version_2_9_X)
/loncom/auth lonlogin.pm
Log:
- Backport 1.109, 1.106.2.2, 1.106.2.3, 1.115, 1.116, 1.117.
- xhtml.
Index: loncom/auth/lonlogin.pm
diff -u loncom/auth/lonlogin.pm:1.106 loncom/auth/lonlogin.pm:1.106.4.1
--- loncom/auth/lonlogin.pm:1.106 Thu Oct 2 11:28:49 2008
+++ loncom/auth/lonlogin.pm Mon May 18 12:59:47 2009
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Login Screen
#
-# $Id: lonlogin.pm,v 1.106 2008/10/02 11:28:49 bisitz Exp $
+# $Id: lonlogin.pm,v 1.106.4.1 2009/05/18 12:59:47 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -84,7 +84,7 @@
$r->print(
$start_page
.'<h1>'.&mt('You are already logged in!').'</h1>'
- .'<p>'.&mt('Please either [_1]continue the current session[_2] or [_3]logout[_4].',
+ .'<p>'.&mt('Please either [_1]continue the current session[_2] or [_3]log out[_4].',
'<a href="/adm/roles">','</a>','<a href="/adm/logout">','</a>').'</p>'
.'<p><a href="/adm/loginproblems.html">'.&mt('Login problems?').'</a></p>'
.$end_page
@@ -266,6 +266,14 @@
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);
@@ -275,7 +283,7 @@
my $now=time;
my $js = (<<ENDSCRIPT);
- <script language="JavaScript">
+ <script type="text/javascript">
function send()
{
this.document.server.elements.uname.value
@@ -346,7 +354,6 @@
'un' => 'Username',
'pw' => 'Password',
'dom' => 'Domain',
- 'perc' => 'percent',
'load' => 'Server Load',
'userload' => 'User Load',
'about' => 'About LON-CAPA',
@@ -379,7 +386,7 @@
if ($fullgraph) {
$r->print(
- '<table width="100%" cellpadding=0 cellspacing=0 border=0>');
+ '<table width="100%" cellpadding="0" cellspacing="0" border="0">');
}
$r->print(<<ENDSERVERFORM);
@@ -410,12 +417,21 @@
if ($shownewuserlink) {
$newuserlink = &newuser_link($lt{'newuser'});
}
- if ($fullgraph) { $r->print(<<ENDTOP);
+ if ($fullgraph) {
+ $r->print(<<HEADER);
<!-- The LON-CAPA Header -->
<tr>
<!-- Row 1 Columns 2-4 -->
- <td width="100%" height=75 colspan=4 align="left" valign="top" bgcolor="$pgbg"><img src="$img" border=0 alt="The Learning Online Network with CAPA" /></td>
+ <td width="100%" height=75 colspan=4 align="left" valign="top" bgcolor="$pgbg">
+HEADER
+ if ($showbanner) {
+ $r->print(<<ENDBANNER);
+<img src="$img" border="0" alt="The Learning Online Network with CAPA" />
+ENDBANNER
+ }
+ $r->print(<<ENDSTART);
+ </td>
</tr>
<!-- The gray bar that starts the two table frames -->
@@ -459,9 +475,15 @@
<!-- The right main column holding the large LON-CAPA logo-->
<!-- Rows 3-4 Column 3 -->
<td align="center" valign="top" width="100%" height="100%" bgcolor="$mainbg">
+ENDSTART
+ if ($showmainlogo) {
+ $r->print(<<ENDLOGO);
<center>
<img src="$logo" alt="" />
</center>
+ENDLOGO
+ }
+ $r->print(<<ENDTOP);
</td>
<!-- Row 3 Column 4 -->
@@ -473,11 +495,11 @@
<!-- Row 4 Column 1 -->
<td align="center" valign="middle" bgcolor="$sidebg">
ENDTOP
-} else {
- $r->print('<h1>The Learning<i>Online</i> Network with CAPA</h1>'
- .'<h2>'.&mt('Text-based Interface Login').'</h2>'
- .$announcements);
-}
+ } else {
+ $r->print('<h1>The Learning<i>Online</i> Network with CAPA</h1>'
+ .'<h2>'.&mt('Text-based Interface Login').'</h2>'
+ .$announcements);
+ }
$r->print('<form name="client" onsubmit="return(send())">');
unless ($fullgraph) {
$r->print(<<ENDACCESSOPTIONS);
@@ -490,8 +512,8 @@
<br />
<input type="checkbox" name="remember" /> $lt{'remember'}<hr />
ENDACCESSOPTIONS
-} else {
- $r->print(<<ENDNOOPT);
+ } else {
+ $r->print(<<ENDNOOPT);
<input type="hidden" name="imagesuppress" value="" />
<input type="hidden" name="embedsuppress" value="" />
<input type="hidden" name="appletsuppress" value="" />
@@ -499,7 +521,7 @@
<input type="hidden" name="blackwhite" value="" />
<input type="hidden" name="remember" value="" />
ENDNOOPT
-}
+ }
my $logintitle;
if ($loginheader eq 'text') {
$logintitle = '<td bgcolor="'.$bgcol.'" colspan="2"> <b><font size="+1" color="'.$textcol.'">'.$lt{'log'}.'</font></b></td>';
@@ -512,11 +534,11 @@
.&mt('Use of LON-CAPA requires Javascript to be enabled in your web browser.')
.'</font></div></noscript></td>';
$r->print(<<ENDLOGIN);
- <input type="hidden" name="lextkey" value="$lextkey">
- <input type="hidden" name="uextkey" value="$uextkey">
+ <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>
+ <table border="0" cellspacing="0" cellpadding="0">
<tr>$logintitle</tr>
<tr>$noscript_warning</tr>
<tr>
@@ -571,12 +593,12 @@
<!-- Row 5 Column 1 -->
<td bgcolor="$sidebg" valign="middle" align="left">
<br />
- <table border=0 cellspacing=0 cellpadding=0>
+ <table border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="$sidebg" align="left" valign="top">
<small><b> $lt{'dom'}: </b></small>
</td>
- <td bgcolor="$sidebg" align="left" valign="top">
+ <td bgcolor="$sidebg" align="left" valign="middle">
<small><tt> $domain</tt></small>
</td>
</tr>
@@ -584,24 +606,24 @@
<td bgcolor="$sidebg" align="left" valign="top">
<small><b> $lt{'serv'}: </b></small>
</td>
- <td bgcolor="$sidebg" align="left" valign="top">
+ <td bgcolor="$sidebg" align="left" valign="middle">
<small><tt> $lonhost ($role)</tt></small>
</td>
</tr>
<tr>
- <td bgcolor="$sidebg" align="left" valign="top">
- <small><b> $lt{'load'}: </b></small>
+ <td bgcolor="$sidebg" align="left" valign="top"><span class="LC_nobreak">
+ <small><b> $lt{'load'}: </b></small></span>
</td>
- <td bgcolor="$sidebg" align="left" valign="top">
- <small><tt> $loadpercent $lt{'perc'}</tt></small>
+ <td bgcolor="$sidebg" align="left" valign="middle">
+ <small><tt> $loadpercent%</tt></small>
</td>
</tr>
<tr>
- <td bgcolor="$sidebg" align="left" valign="top">
- <small><b> $lt{'userload'}: </b></small>
+ <td bgcolor="$sidebg" align="left" valign="top"><span class="LC_nobreak">
+ <small><b> $lt{'userload'}: </b></small></span>
</td>
- <td bgcolor="$sidebg" align="left" valign="top">
- <small><tt> $userloadpercent $lt{'perc'}</tt></small>
+ <td bgcolor="$sidebg" align="left" valign="middle">
+ <small><tt> $userloadpercent%</tt></small>
</td>
</tr>
</table>