--- loncom/interface/createaccount.pm 2009/09/23 02:05:38 1.36.10.1 +++ loncom/interface/createaccount.pm 2010/11/29 15:13:08 1.37.2.3 @@ -3,7 +3,7 @@ # institutional log-in ID (institutional authentication required - localauth # or kerberos) or an e-mail address. # -# $Id: createaccount.pm,v 1.36.10.1 2009/09/23 02:05:38 gci Exp $ +# $Id: createaccount.pm,v 1.37.2.3 2010/11/29 15:13:08 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -278,7 +278,7 @@ sub selfenroll_crumbs { my ($r,$courseid,$desc) = @_; &Apache::lonhtmlcommon::add_breadcrumb ({href=>"javascript:ToCatalog('backupcrumbs','')", - text=>"Course Catalog"}); + text=>"Course/Community Catalog"}); if ($env{'form.coursenum'} ne '') { &Apache::lonhtmlcommon::add_breadcrumb ({href=>"javascript:ToCatalog('backupcrumbs','details')", @@ -374,6 +374,13 @@ function validate_email() { if (validmail(field) == false) { alert("$lt{'email'}: "+field.value+" $lt{'notv'}."); return false; + } else { + var emailaddr = field.value; + var lcemail = emailaddr.toLowerCase(); + if (emailaddr != lcemail) { + field.value = lcemail; + alert("WebCenter usernames are all lower case.\\nAccordingly your username will be "+lcemail+" once activated."); + } } return true; } @@ -420,7 +427,8 @@ sub print_username_form { &Apache::lonhtmlcommon::row_closure(1). &Apache::lonhtmlcommon::row_title(&mt('Validation'), 'LC_pick_box_title')."\n". - $captchaform."\n".'

'; + $captchaform."\n". + &mt('If either word is hard to read, [_1] will replace them.','reCAPTCHA refresh').'

'; if ($courseid ne '') { $output .= ''."\n"; } @@ -467,7 +475,7 @@ sub login_box { my $unameform = ''; my $upassform = ''; $output .= '
'."\n". - ''. + ''. &Apache::lonhtmlcommon::start_pick_box()."\n". &Apache::lonhtmlcommon::row_title($titles{$context}, 'LC_pick_box_title')."\n". @@ -497,7 +505,7 @@ sub login_box { sub process_email_request { my ($useremail,$domain,$domdesc,$contact_name,$contact_email,$cancreate, $server,$settings,$courseid) = @_; - $useremail = $env{'form.useremail'}; + $useremail = lc($env{'form.useremail'}); my $output; if (ref($cancreate) eq 'ARRAY') { if (!grep(/^email$/,@{$cancreate})) { @@ -1124,17 +1132,17 @@ sub invalid_state { my ($error,$domdesc,$contact_name,$contact_email,$msgtext) = @_; my $msg = '

'.&mt('Account creation unavailable').'

'; if ($error eq 'baduseremail') { - $msg = &mt('The e-mail address you provided does not appear to be a valid address.'); + $msg .= &mt('The e-mail address you provided does not appear to be a valid address.'); } elsif ($error eq 'existinguser') { - $msg = &mt('The e-mail address you provided is already in use as a username in LON-CAPA at this institution.'); + $msg .= &mt('The e-mail address you provided is already in use as a username in LON-CAPA at this institution.'); } elsif ($error eq 'userrules') { - $msg = &mt('Username rules at this institution do not allow the e-mail address you provided to be used as a username.'); + $msg .= &mt('Username rules at this institution do not allow the e-mail address you provided to be used as a username.'); } elsif ($error eq 'userformat') { - $msg = &mt('The e-mail address you provided may not be used as a username at this LON-CAPA institution.'); + $msg .= &mt('The e-mail address you provided may not be used as a username at this LON-CAPA institution.'); } elsif ($error eq 'captcha') { - $msg = &mt('Validation of the code your entered failed.'); + $msg .= &mt('Validation of the code your entered failed.'); } elsif ($error eq 'noemails') { - $msg = &mt('Creation of a new user account using an e-mail address as username is not permitted at this LON-CAPA institution.'); + $msg .= &mt('Creation of a new user account using an e-mail address as username is not permitted at this LON-CAPA institution.'); } $msg .= ''; if ($msgtext) {