version 1.51, 2021/11/30 16:08:44
|
version 1.54, 2025/02/15 03:43:36
|
Line 289 END
|
Line 289 END
|
$js.= "\n".'<script src="https://www.google.com/recaptcha/api.js"></script>'."\n"; |
$js.= "\n".'<script src="https://www.google.com/recaptcha/api.js"></script>'."\n"; |
} |
} |
my $header = &Apache::loncommon::start_page('Reset password',$js,$args). |
my $header = &Apache::loncommon::start_page('Reset password',$js,$args). |
'<h2>'.&mt('Reset forgotten LON-CAPA password').'</h2>'; |
'<div class="LC_landmark" role="banner">'. |
|
'<h2 class="LC_heading_2">'.&mt('Reset forgotten LON-CAPA password').'</h2></div>'; |
my $output; |
my $output; |
if ($token) { |
if ($token) { |
$r->print($header); |
$r->print($header.'<div class="LC_landmark" role="main">'); |
&reset_passwd($r,$token,$contact_name,$contact_email,$clientip,\%passwdconf); |
&reset_passwd($r,$token,$contact_name,$contact_email,$clientip,\%passwdconf); |
$r->print(&Apache::loncommon::end_page()); |
$r->print('</div>'.&Apache::loncommon::end_page()); |
return OK; |
return OK; |
} elsif ($udom) { |
} elsif ($udom) { |
if (!$domdesc) { |
if (!$domdesc) { |
Line 418 END
|
Line 419 END
|
} else { |
} else { |
$output = &get_uname($server,$defdom,\%passwdconf); |
$output = &get_uname($server,$defdom,\%passwdconf); |
} |
} |
$r->print($header.$output); |
$r->print($header.'<div class="LC_landmark" role="main">'.$output.'</div>'); |
$r->print(&Apache::loncommon::end_page()); |
$r->print(&Apache::loncommon::end_page()); |
return OK; |
return OK; |
} |
} |
Line 442 sub get_uname {
|
Line 443 sub get_uname {
|
$msg .= $contents; |
$msg .= $contents; |
} |
} |
} |
} |
$msg .= '<p>'.&mt('Three conditions must be met:') |
$msg .= '<p>'.&mt('Three conditions must be met:').'</p>' |
.'<ul><li>'.&mt('An e-mail address must have previously been associated with your LON-CAPA username.').'</li>' |
.'<ul><li>'.&mt('An e-mail address must have previously been associated with your LON-CAPA username.').'</li>' |
.'<li>'.&mt('You must be able to access e-mail sent to that address.').'</li>' |
.'<li>'.&mt('You must be able to access e-mail sent to that address.').'</li>' |
.'<li>'.&mt('Your LON-CAPA account must be of a type for which LON-CAPA can reset a password.') |
.'<li>'.&mt('Your LON-CAPA account must be of a type for which LON-CAPA can reset a password.').'</li>' |
.'</ul></p>'; |
.'</ul>'; |
my $onchange = 'javascript:verifyDomain(this,this.form);'; |
my $onchange = 'javascript:verifyDomain(this,this.form);'; |
$msg .= '<form name="forgotpw" method="post" action="/adm/resetpw" onsubmit="return validInfo();">'. |
$msg .= '<form name="forgotpw" method="post" action="/adm/resetpw" onsubmit="return validInfo();">'. |
&Apache::lonhtmlcommon::start_pick_box(). |
&Apache::lonhtmlcommon::start_pick_box(). |
&Apache::lonhtmlcommon::row_title($lt{'udom'}). |
&Apache::lonhtmlcommon::row_title('<label for="udom">'.$lt{'udom'}.'</label>'). |
&Apache::loncommon::select_dom_form($defdom,'udom',undef,undef,$onchange). |
&Apache::loncommon::select_dom_form($defdom,'udom',undef,undef,$onchange,'','','','udom'). |
&Apache::lonhtmlcommon::row_closure(1). |
&Apache::lonhtmlcommon::row_closure(1). |
&Apache::lonhtmlcommon::row_title($lt{'unam'}). |
&Apache::lonhtmlcommon::row_title('<label for="uname">'.$lt{'unam'}.'</label>'). |
'<input type="text" name="uname" size="20" autocapitalize="off" autocorrect="off" />'. |
'<input type="text" name="uname" id="uname" size="20" autocapitalize="off" autocorrect="off" />'. |
&Apache::lonhtmlcommon::row_closure(1). |
&Apache::lonhtmlcommon::row_closure(1). |
&Apache::lonhtmlcommon::row_title($lt{'uemail'}). |
&Apache::lonhtmlcommon::row_title('<label for="useremail">'.$lt{'uemail'}.'</label>'). |
'<input type="text" name="useremail" size="30" autocapitalize="off" autocorrect="off" />'. |
'<input type="text" name="useremail" id="useremail" size="30" autocapitalize="off" autocorrect="off" />'. |
&Apache::lonhtmlcommon::row_closure(1); |
&Apache::lonhtmlcommon::row_closure(1); |
unless ($passwdconf->{'captcha'} eq 'notused') { |
unless ($passwdconf->{'captcha'} eq 'notused') { |
my ($captcha_form,$captcha_error,$captcha,$recaptcha_version) = |
my ($captcha_form,$captcha_error,$captcha,$recaptcha_version) = |