Clone of https://drupal.org/project/entityreference