Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide "Unknown" Marital Status in Bio Block? #855

Closed
MrUpsideDown opened this issue Feb 25, 2015 · 5 comments
Closed

Hide "Unknown" Marital Status in Bio Block? #855

MrUpsideDown opened this issue Feb 25, 2015 · 5 comments

Comments

@MrUpsideDown
Copy link
Collaborator

When Marital Status is set to "Unknown" the Bio block displays the word "Unknown" without any context. This looks strange - I think it is less confusing to display nothing at all.

Here is a change I have implemented and tested for our site:

In RockWeb.Blocks.Crm.PersonalDetail.Bio.OnLoad(EventArgs e)

Old:

lMaritalStatus.Text = Person.MaritalStatusValueId.DefinedValue();

New:

if (Person.MaritalStatusValueId.HasValue)
{
    var dvMaritalStatus = Rock.Web.Cache.DefinedValueCache.Read(Person.MaritalStatusValueId.Value);

    if (dvMaritalStatus != null &&
        !dvMaritalStatus.Guid.Equals(Rock.SystemGuid.DefinedValue.PERSON_MARITAL_STATUS_UNKNOWN.AsGuid()))
            lMaritalStatus.Text = dvMaritalStatus.Value;
}

Also, I think the Defined Value "Marital Status/Unknown" should probably be marked as a system-defined value? Currently, this Defined Value can be deleted, whereas "Married" and "Single" cannot.

@MrUpsideDown
Copy link
Collaborator Author

Also with regard to the "Unknown" Marital Status, I think the caption on the New Family page "The adults in this family are" might make more sense if it just read "Marital Status of Adults".

@azturner
Copy link
Contributor

We're actually removing the 'Unknown' value from the marital status defined value list, since that's essentially the same thing as no value.

@MrUpsideDown
Copy link
Collaborator Author

Exactly! That's an even better solution - I guess the "Add Family" block will no longer have Marital Status as a required field then?

@azturner
Copy link
Contributor

Correct, but it can now also be configured to force users to confirm entering a blank (unknown) marital status when they are adding new adults.

@MrUpsideDown
Copy link
Collaborator Author

All bases covered then - great work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants