Diff for /loncom/interface/lonpreferences.pm between versions 1.198 and 1.199

version 1.198, 2012/08/16 17:02:55 version 1.199, 2012/10/04 13:41:10
Line 1346  sub passwordchanger { Line 1346  sub passwordchanger {
     } elsif ($caller eq 'reset_by_email') {      } elsif ($caller eq 'reset_by_email') {
             my %data = &Apache::lonnet::tmpget($mailtoken);              my %data = &Apache::lonnet::tmpget($mailtoken);
             if (keys(%data) == 0) {              if (keys(%data) == 0) {
                 $r->print(&mt('Sorry, the URL you provided to complete the reset of your password was invalid. Either the token included in the URL has been deleted or the URL you provided was invalid. Please submit a [_1]new request[_2] for a password reset, and follow the link to the new URL included in the e-mail that will be sent to you, to allow you to enter a new password.'                  $r->print(
                              ,'<a href="/adm/resetpw">','</a>')                      '<p class="LC_warning">'
                      .&mt('Sorry, the URL you provided to complete the reset of your password was invalid. Either the token included in the URL has been deleted or the URL you provided was invalid. Please submit a [_1]new request[_2] for a password reset, and follow the link to the new URL included in the e-mail that will be sent to you, to allow you to enter a new password.'
                          ,'<a href="/adm/resetpw">','</a>')
                      .'</p>'
                 );                  );
                 return;                  return;
             }              }
Line 1357  sub passwordchanger { Line 1360  sub passwordchanger {
                     $domain = $data{'domain'};                      $domain = $data{'domain'};
                     $currentpass = $data{'temppasswd'};                      $currentpass = $data{'temppasswd'};
                 } else {                  } else {
                     $r->print(&mt('Sorry, the token generated when you requested a password reset has expired.').'<br />');                      $r->print(
                           '<p class="LC_warning">'
                          .&mt('Sorry, the token generated when you requested'
                              .' a password reset has expired.')
                          .'</p>'
                       );
                     return;                      return;
                 }                  }
             } else {              } else {
                 $r->print(&mt('Sorry, the URL generated when you requested reset of your password contained incomplete information.').'<br />');                  $r->print(
                       '<p class="LC_warning">'
                      .&mt('Sorry, the URL generated when you requested reset of'
                          .' your password contained incomplete information.')
                      .'</p>'
                   );
                 return;                  return;
             }              }
             if (&Apache::lonnet::domain($domain) eq '') {              if (&Apache::lonnet::domain($domain) eq '') {
                 $domain = $r->dir_config('lonDefDomain');                  $domain = $r->dir_config('lonDefDomain');
             }              }
     } else {      } else {
         $r->print(&mt('Page requested in unexpected context').'<br />');          $r->print(
               '<p class="LC_error">'
              .&mt('Page requested in unexpected context')
              .'</p>'
           );
         return;          return;
     }      }
     my $currentauth=&Apache::lonnet::queryauthenticate($user,$domain);      my $currentauth=&Apache::lonnet::queryauthenticate($user,$domain);
Line 1640  ENDERROR Line 1657  ENDERROR
     }       } 
     if ($newpass1 ne $newpass2) {      if ($newpass1 ne $newpass2) {
  &passwordchanger($r,   &passwordchanger($r,
  '<span class="LC_error">'.   '<span class="LC_warning">'.
  &mt('The new passwords you entered do not match.').'  '.   &mt('The new passwords you entered do not match.').'  '.
  &mt('Please try again.').'</span>',$caller,$mailtoken);   &mt('Please try again.').'</span>',$caller,$mailtoken);
  return 1;   return 1;
     }      }
     if (length($newpass1) < 7) {      if (length($newpass1) < 7) {
  &passwordchanger($r,   &passwordchanger($r,
  '<span class="LC_error">'.   '<span class="LC_warning">'.
  &mt('Passwords must be a minimum of 7 characters long.').'  '.   &mt('Passwords must be a minimum of 7 characters long.').'  '.
  &mt('Please try again.').'</span>',$caller,$mailtoken);   &mt('Please try again.').'</span>',$caller,$mailtoken);
  return 1;   return 1;
Line 1660  ENDERROR Line 1677  ENDERROR
     }      }
     if ($badpassword) {      if ($badpassword) {
  # I can't figure out how to enter bad characters on my browser.   # I can't figure out how to enter bad characters on my browser.
  my $errormessage ='<span class="LC_error">'.   my $errormessage ='<span class="LC_warning">'.
            &mt('The password you entered contained illegal characters.').'<br />'.             &mt('The password you entered contained illegal characters.').'<br />'.
            &mt('Valid characters are').(<<"ENDERROR");             &mt('Valid characters are').(<<"ENDERROR");
 : space and <br />  : space and <br />

Removed from v.1.198  
changed lines
  Added in v.1.199


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