function forgot_password_inline_onSuccess(t) {
  var result = t.responseJSON;
  /*
    If email address was found show the code form
    else display error
  */
  if(result.success)
  {
    $('reset_email').value = '';
    Effect.SlideUp('forgot_password_container_inline');
    Effect.SlideDown('reset_password_container_inline', { queue: 'end' });
  }
  else
  {
    display_notification('Could not find member matching the email address entered. Please check your entry and try again');
  }
}

function forgot_password_inline_onFailure(t) {
  //Handle failure
}

function reset_password_inline_onSuccess(t) {
  var result = t.responseJSON;
  
  //
  if(result.success)
  {
    $('password_code').value = '';
    $('new_password').value = '';
    display_notification('Password changed successfully');
    Effect.SlideUp('reset_password_container_inline');
  }
  else
  {
    switch(result.error_code)
    {
      case 'code_not_found':
        display_notification('Code could not be found');
        break;
        
      case 'no_password':
        display_notification('No password was set, password is required');
        break;
        
      default:
        display_notification('Error');
        break; 
    }
  }
}

function reset_password_inline_onFailure(t) {
  //Handle failure
}
