Commit 93e916cf authored by Dave Lane's avatar Dave Lane

improved user feedback for the password reset process

parent 25a4d54d
......@@ -186,7 +186,7 @@ article.ore-form .container .entry-content > div.ore {
#ore-container .modal-dialog .modal-header button.close {
/*margin: -10px -15px 0 0;*/
margin: 0px -15px 0 0;
margin: -10px -15px 0 0;
padding: 0;
width: 16px;
height: 16px;
......@@ -292,9 +292,12 @@ button.ore-processing {
text-align: left;
#ore-error-wrapper h2 {
color: #555;
margin-top: 0.2em;
margin-bottom: 0.2em;
color: #000;
font-size: 20px;
margin-top: 20px;
margin-bottom: .2em;
border-bottom: none;
line-height: 1.15em;
#ore-error-wrapper ol {
list-style: decimal;
......@@ -302,6 +305,7 @@ button.ore-processing {
#ore-error-wrapper li {
display: block;
color: red;
list-style: decimal;
list-style-type: decimal;
......@@ -281,8 +281,9 @@ class OREMain extends OREBase {
$headers = array("From: OERu Course Admin <".$from.">");
if ($message && !wp_mail($user_email, wp_specialchars_decode($title), $message, $headers)) {
$this->log('sending email via wp_email failed with email '.$user_email.', title '.wp_specialchars_decode($title).', and message '.$message.'... and headers: '.print_r($headers, true));
$errors->add(ORE_ERROR_LABEL, 'The site failed to send an email. This is either because the email is invalid, or because this site is having difficulty sending email. To report this, you can <a href="">contact us</a>.');
//wp_die(__('The email could not be sent.')."<br />\n".__('Possible reason: your host may have disabled the mail() function.'));
return false;
return $errors;
return true;
......@@ -77,6 +77,7 @@ static $modals = array(
'markup' => '<p>If you have forgotten your password, you can request a reset. We need to know <em>one</em> of the following: (1) the email address you used to register, or (2) your username.</p>'.
'<div class="form-group">'.
'<label for="credential">Enter your Username or Email to identify yourself.</label>'.
'<div id="ore-error-wrapper"></div>'.
'<input type="text" class="form-control" id="credential" name="credential" placeholder="username or user@email" value="{username}{email}" aria-describedby="helpCredential">'.
'<span id="helpCredential" class="help-block">Either is acceptable, because both uniquely identify you in this system.</span>'.
......@@ -107,7 +108,8 @@ static $modals = array(
'purpose' => 'confirmation',
'markup' => '<p>We were not able to find a user with the details you have entered in our system.</p>'.
'<p>Please check that you have typed in your chosen identifier - your username or email - correctly.</p>'.
'<p>If it\'s possible you haven\'t previously registered an account with us, you can do that now.</p>',
'<p>If it\'s possible you haven\'t previously registered an account with us, you can do that now.</p>'.
'<div id="ore-error-wrapper"></div>',
'default' => array(
'label' => 'Try again',
'class' => 'submit',
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment