Diff for /loncom/interface/createaccount.pm between versions 1.76 and 1.77

version 1.76, 2017/11/12 20:42:52 version 1.77, 2019/05/05 04:00:42
Line 37  use Apache::lonacc; Line 37  use Apache::lonacc;
 use Apache::lonnet;  use Apache::lonnet;
 use Apache::loncommon;  use Apache::loncommon;
 use Apache::lonhtmlcommon;  use Apache::lonhtmlcommon;
   use Apache::lonuserutils;
 use Apache::lonlocal;  use Apache::lonlocal;
 use Apache::lonauth;  use Apache::lonauth;
 use Apache::resetpw;  use Apache::resetpw;
Line 520  ENDSCRIPT Line 521  ENDSCRIPT
 }  }
   
 sub javascript_checkpass {  sub javascript_checkpass {
     my ($now,$context) = @_;      my ($now,$context,$domain) = @_;
     my $nopass = &mt('You must enter a password.');      my $nopass = &mt('You must enter a password.');
     my $mismatchpass = &mt('The passwords you entered did not match.')."\n".      my $mismatchpass = &mt('The passwords you entered did not match.')."\n".
                        &mt('Please try again.');                          &mt('Please try again.'); 
       my ($numrules,$intargjs) =
           &Apache::lonuserutils::passwd_validation_js('upass',$domain);
     &js_escape(\$nopass);      &js_escape(\$nopass);
     &js_escape(\$mismatchpass);      &js_escape(\$mismatchpass);
     my $js = <<"ENDSCRIPT";      my $js = <<"ENDSCRIPT";
Line 540  sub javascript_checkpass { Line 543  sub javascript_checkpass {
                 return false;                  return false;
             }              }
             if (upass == upasscheck) {              if (upass == upasscheck) {
                   var numrules = $numrules;
                   if (numrules > 0) {
   $intargjs
                   }
                 client.elements.upasscheck$now.value='';                  client.elements.upasscheck$now.value='';
                 if (validate_email(client)) {                  if (validate_email(client)) {
                     send(one,two,'$context');                      send(one,two,'$context');
Line 1096  sub print_dataentry_form { Line 1103  sub print_dataentry_form {
         close($jsh);          close($jsh);
         $output = &javascript_setforms($now,$emailusername,$captcha,$usertype,$recaptchaversion,          $output = &javascript_setforms($now,$emailusername,$captcha,$usertype,$recaptchaversion,
                                        $usernameset,$condition,$excluded).                                         $usernameset,$condition,$excluded).
                   "\n".&javascript_checkpass($now,'email');                    "\n".&javascript_checkpass($now,'email',$domain);
         my ($lkey,$ukey) = &Apache::loncommon::des_keys();          my ($lkey,$ukey) = &Apache::loncommon::des_keys();
         my ($lextkey,$uextkey) = &getkeys($lkey,$ukey);          my ($lextkey,$uextkey) = &getkeys($lkey,$ukey);
         my $logtoken=Apache::lonnet::reply('tmpput:'.$ukey.$lkey.'&createaccount:createaccount',          my $logtoken=Apache::lonnet::reply('tmpput:'.$ukey.$lkey.'&createaccount:createaccount',

Removed from v.1.76  
changed lines
  Added in v.1.77


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>