[LON-CAPA-cvs] cvs: modules /raeburn/register resetpw.pm
raeburn
lon-capa-cvs@mail.lon-capa.org
Wed, 21 Mar 2007 22:20:32 -0000
raeburn Wed Mar 21 18:20:32 2007 EDT
Modified files:
/modules/raeburn/register resetpw.pm
Log:
Token was not being retrieved because $input{'token'} is an array.
Use registration.css
Index: modules/raeburn/register/resetpw.pm
diff -u modules/raeburn/register/resetpw.pm:1.2 modules/raeburn/register/resetpw.pm:1.3
--- modules/raeburn/register/resetpw.pm:1.2 Fri Feb 3 20:35:23 2006
+++ modules/raeburn/register/resetpw.pm Wed Mar 21 18:20:30 2007
@@ -11,14 +11,21 @@
sub handler {
my $r = shift;
my %input = ();
- &Apache::LON::processform::getitems($r,\%input);
- foreach (keys %input) {
- $input{$_} =~ s#`#'#g;
- $input{$_} =~ s#\$#\(\$\)#g;
+ &Apache::LON::processform::getitems($r->args,\%input);
+ foreach my $key (keys(%input)) {
+ if (ref($input{$key}) eq 'ARRAY') {
+ for (my $i=0; $i<@{$input{$key}}; $i++) {
+ $input{$key}[$i] =~ s#`#'#g;
+ $input{$key}[$i] =~ s#\$#\(\$\)#g;
+ }
+ } else {
+ $input{$key} =~ s#`#'#g;
+ $input{$key} =~ s#\$#\(\$\)#g;
+ }
}
my $email = $input{'guestID'}[0];
$email =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C",hex($1))/eg;
- my $token = $input{'token'};
+ my $token = $input{'token'}[0];
my $dbpwd;
my $authkeydir = "/home/helpdesk/admindata";
my $authkeyfile = $authkeydir.'/mysql.dat';
@@ -73,8 +80,9 @@
$msg = &get_email();
}
my $output = (<<"END");
-<html>
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
+<link type="text/css" rel="stylesheet" href="/css/registration.css">
<title>Reset password</title>
END
&main_box(\$output);
@@ -100,7 +108,7 @@
my $msg = <<"END";
<form name="forgotpw" method="get">
Enter the e-mail address you use as your guestID to
-access the LON-CAPA registration/support system: <input type="text" name="guestID" value="" size="25"> <input type="button" class="buttonred" name="idsubmit" value="Go" onClick="document.forgotpw.submit()"></form><br /><br />
+access the LON-CAPA registration/support system: <input type="text" name="guestID" value="" size="25"> <input type="button" class="buttoncolored" name="idsubmit" value="Go" onClick="document.forgotpw.submit()"></form><br /><br />
END
return $msg;
}
@@ -212,68 +220,25 @@
sub main_box {
my ($output) = @_;
$$output .= <<"END";
-<style type="text/css">
-<!--
- body {font-family: arial,verdana, sans-serif; }
- a:link {text-decoration: none; color: #000000; }
- a:visited {text-decoration: none; color: #000000; }
- a:active {text-decoration: none; color: #000000; }
- a:hover {text-decoration: underline; color: #000000; }
-
-.bodywhite
-{
- font-size: 12px; font-family: arial,verdana,sans-serif;
- line-height: 14px; color: #ffffff;
-}
-
-.bodyblue
-{
- font-size: 12px; font-family: arial,verdana,sans-serif;
- line-height: 14px; color: #000000;
-}
-
-.headlineblue
-{
- font-size: 21px; font-family: arial,verdana,sans-serif;
- line-height: 24px; color: #01197D;
-}
-
-.buttonwhite
-{
- font-size: 13px; font-weight: bold; font-family: arial, Trebuchet MS, verdana, helvetica, san-serif;
- line-height: 15px; color: #000000; text-align: center; background: #FFFFFF; padding: 4px;
-}
-
-.buttonred
-{
- font-size: 13px; font-family: arial, Trebuchet MS, verdana, helvetica, san-serif; padding: 4px; line-height: 15px; color: #FFFFFF; text-align: center; background: #CC6633; font-weight: bold;
-}
-
--->
-</style>
</head>
-<body bgcolor="#ffffff" topmargin="0" leftmargin="0" marginheight="0" marginwidth="0">
-<div align="center">
- <br />
- <br />
-</div>
+<body>
<br />
<div align="center">
-<table width="720" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFF99">
+<table class="LC_loginbox">
<tr>
<td align="left" valign="top" width="12" nowrap><img name="login_r1_c1" src="/images/login/lclogin_r1_c1.gif" width="12" height="10" border="0" alt=""></td>
<td width="450" nowrap valign="top">
- <table border="0" cellpadding="0" cellspacing="0" width="450" bgcolor="#FFFF99">
+ <table class="LC_loginbox_left">
<tr>
- <td width="15" rowspan="2" nowrap><spacer type="block" width="15"></td>
- <td width="266" align="left" nowrap><img src="/images/login/lonlogos.gif" width="74" height="50" align="left"><br /><font size="-1">The Learning<i>Online</i> Network with CAPA</font></td>
+ <td width="15" rowspan="2" nowrap> </td>
+ <td width="266" align="left" nowrap><img src="/images/login/lonlogos.gif" width="74" height="50" align="left"><br /><nobr><font size="-1">The Learning<i>Online</i> Network with CAPA</font></nobr></td>
</td>
- <td width="15" nowrap><spacer type="block" width="15"></td>
+ <td width="15" nowrap> </td>
<td width="130" align="left" nowrap><img src="/images/login/student.jpg" rowspan="2" width="130" height="85"></td>
- <td width="24" rowspan="2" nowrap><spacer type="block" width="20"></td>
+ <td width="24" rowspan="2" nowrap> </td>
</tr>
<tr>
- <td colspan="5" bgcolor="#FFFF99" width="450" height="8"><img src="/images/login/login_red_horiz.gif" width="450" height="8"></td>
+ <td width="450" height="8"><img src="/images/login/login_red_horiz.gif" width="450" height="8"></td>
</tr>
</table>
END
@@ -283,10 +248,10 @@
my $output= shift;
$$output .= <<"END_OF_FOOT";
</table>
-<table width="720" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFF99">
+<table class="LC_loginbox_left">
<tr>
- <td align="left" valign="bottom" width="10"><img src="/images/login/lclogin_r9_c1.gif" width="12" height="10" border="0" alt=""></td>
- <td width="696" nowrap><spacer type="block" width="696"></td>
+ <td align="left" valign="bottom" width="10"><img src="/images/login/lclogin_r9_c1.gif" width="10" height="10" border="0" alt=""></td>
+ <td width="698" nowrap> </td>
<td align="right" valign="bottom" width="10"><img src="/images/login/lclogin_r9_c7.gif" width="12" height="10" border="0" alt=""></td>
</tr>
</table>