Issue #233: Fix "resource" for reference fields.
Issue #226: Add allowed values for reference fields.
Merge branch '7.x-1.x' into uid-user