Problem/Motivation

Ubercart Addresses has an option to require user to enter an address during registration. The location of the address fields on the registration form can not be changed through the UI.

Proposed resolution

Implement hook_field_extra_fields(), so the location of the address fields can be changed on the "Manage fields" page for the user entity (admin/config/people/accounts/fields).

Remaining tasks

  • Implement hook_field_extra_fields().

User interface changes

Admins will be able to change the location of the address fields on the registration page.

API changes

None.

Patch will follow.

Comments

megachriz’s picture

Status: Active » Needs review
StatusFileSize
new854 bytes

Here is the patch.

megachriz’s picture

In addition of the patch in #1, this patch hides the entry on the "Manage fields" page if in the address settings the address form element on the user registration page is disabled: when both "Require that an address be entered during registration" and "Require admins to enter an address upon user creation" are disabled there is no point for providing a weight setting of the address form element on the user registration page (since it won't appear in that case).

The patch also changes the description on the form element, so it's clear it's only shown on the user registration page.

If this patch doesn't break tests (I would be surprised), then it's ready for commit.

megachriz’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

Corrected hook name.