[LON-CAPA-cvs] cvs: loncom /auth lonlogin.pm
tempelho
lon-capa-cvs-allow@mail.lon-capa.org
Sun, 23 Nov 2008 11:01:01 -0000
tempelho Sun Nov 23 11:01:01 2008 EDT
Modified files:
/loncom/auth lonlogin.pm
Log:
Seperating style and logic
Index: loncom/auth/lonlogin.pm
diff -u loncom/auth/lonlogin.pm:1.107 loncom/auth/lonlogin.pm:1.108
--- loncom/auth/lonlogin.pm:1.107 Sat Nov 22 19:07:02 2008
+++ loncom/auth/lonlogin.pm Sun Nov 23 11:01:01 2008
@@ -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.108 2008/11/23 11:01:01 tempelho Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -311,7 +311,7 @@
leftmargin => "0",
marginheight => "0",
marginwidth => "0",
- bgcolor => "$pgbg",
+ bgcolor => "$mainbg",
text => "$font",
link => "$link",
vlink => "$vlink",
@@ -376,66 +376,75 @@
<input type="hidden" name="localres" value="$env{'form.localres'}" />
</form>
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 = '<img src="'.$login.'" alt="'.
- &mt('User Authentication').'" />';
- }
-
- my $noscript_warning='<noscript>'
- .&mt('Use of LON-CAPA requires Javascript to be enabled in your web browser.')
- .'</noscript>';
- my $helpdeskscript;
- my $contactblock = &contactdisplay(\%lt,$servadm,$showadminmail,
- $version,$authdomain,\$helpdeskscript);
-
- if ($fullgraph) {
- $r->print(<<ENDTOP);
- <!-- The LON-CAPA Header -->
+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 = '<img src="'.$login.'" alt="'.
+ &mt('User Authentication').'" />';
+}
+
+my $noscript_warning='<noscript><span class="LC_warning"><b>'
+ .&mt('Use of LON-CAPA requires Javascript to be enabled in your web browser.')
+ .'</b></span></noscript>';
+my $helpdeskscript;
+my $contactblock = &contactdisplay(\%lt,$servadm,$showadminmail,
+ $version,$authdomain,\$helpdeskscript);
+my $loncapaheader=(<<HEADER);
+<!-- The LON-CAPA Header -->
<table border="0" align="left" width="100%" cellspacing="0" cellpadding="1">
-<tr>
-<td align="left" valign="top" bgcolor="$pgbg"> <img src="$img" border=0 alt="The Learning Online Network with CAPA" /> </td>
-</tr>
+ <tr>
+ <td align="left" valign="top" bgcolor="$pgbg">
+ <img src="$img" border=0 alt="The Learning Online Network with CAPA" />
+ </td>
+ </tr>
</table>
+HEADER
- <div class="LC_loginpage_space"> </div>
+my $loginform=(<<LFORM);
+<form name="client" onsubmit="return(send())">
+ <input type="hidden" name="lextkey" value="$lextkey">
+ <input type="hidden" name="uextkey" value="$uextkey">
+ <b><label for="uname">$lt{'un'}</label>:</b><br />
+ <input type="text" name="uname" size="10" value="$authusername" /><br />
+ <b><label for="upass$now">$lt{'pw'}</label>:</b><br />
+ <input type="password" name="upass$now" size="10" /><br />
+ <b><label for="udom">$lt{'dom'}</label>:</b><br />
+ <input type="text" name="udom" size="10" value="$authdomain" /><br />
+ <input type="submit" value="$lt{'log'}" />
+</form>
+LFORM
+
+if ($fullgraph) {
+$r->print(<<ENDTOP);
+$loncapaheader
+<div class="LC_loginpage_space"> </div>
<img src="$logo" alt="" />
- <div class="LC_loginpage_loginContainer"><fieldset class="LC_loginpage_fieldset">
-<legend class="LC_loginpage_legend">$logintitle</legend>
-<table border="0" align="left" cellspacing="1" cellpadding="1" width="100%">
- <tr>
- <td width="50%" align="center" valign="top">$domainlogo</td>
- <td>
-ENDTOP
-
-$r->print('<form name="client" onsubmit="return(send())">');
-$r->print(<<ENDTOPP)
- <input type="hidden" name="lextkey" value="$lextkey">
- <input type="hidden" name="uextkey" value="$uextkey">
- <b><label for="uname">$lt{'un'}</label>:</b><br />
- <input type="text" name="uname" size="10" value="$authusername" /><br />
- <b><label for="upass$now">$lt{'pw'}</label>:</b><br />
- <input type="password" name="upass$now" size="10" /><br />
- <b><label for="udom">$lt{'dom'}</label>:</b><br />
- <input type="text" name="udom" size="10" value="$authdomain" /><br />
- <input type="submit" value="$lt{'log'}" />
- </form>
- </td>
- </tr>
-</table>
-$noscript_warning
-</fieldset></div>
+<div class="LC_loginpage_loginContainer">
+ <fieldset class="LC_loginpage_fieldset">
+ <legend class="LC_loginpage_legend">$logintitle</legend>
+ <table border="0" align="left" cellspacing="1" cellpadding="1" width="100%">
+ <tr>
+ <td width="50%" align="center" valign="top">
+ $domainlogo
+ </td>
+ <td>
+ $loginform
+ </td>
+ </tr>
+ </table>
+ $noscript_warning
+ </fieldset>
+</div>
<div class="LC_loginpage_loginInfo">
$loginhelp<br />
@@ -445,18 +454,16 @@
<a href="/adm/about.html"><b>$lt{'about'}</b></a><br />
$helpdeskscript
</div>
+
<div class="LC_loginpage_space"> </div>
$announcements
-ENDTOPP
+ENDTOP
}
-if($announcements){$r->print('<div class="LC_loginpage_space"> </div>');}
+if($announcements){$r->print('<div class="LC_loginpage_space"> </div>');}
- if ($fullgraph) {
-
- $r->print(<<ENDDOCUMENT);
-
-
+if ($fullgraph) {
+$r->print(<<ENDDOCUMENT);
<table border=0 cellspacing=0 cellpadding=0>
<tr>
<td bgcolor="$sidebg" align="left" valign="top">