For example, the reciprocal setting only needs to be visible when it is a one-way relationship type.

Check if there are others...

CommentFileSizeAuthor
#3 use_states.patch1.62 KBBerdir
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Berdir’s picture

Status: Needs work » Active
BenK’s picture

This is a good idea... would simplify things quite a bit.

Berdir’s picture

Status: Active » Needs review
FileSize
1.62 KB

And here is a patch, hides the request expires textfield if approval is not necessary and hides the reciprocal setting if a relationship is not one-way

BenK’s picture

Status: Needs review » Needs work

The patch in #3 works nicely. Settings are being hidden as expected and it's a nice simplification of the form.

Only one thing I noticed: If you uncheck "Requires approval", then "Request expires in" hides nicely. But if you go back and look at the relationship types list at admin/config/people/relationships, then it still shows the expiration time (in my case "6 days") in the "Expiration" column. Since this expiration setting doesn't make sense unless "Requires approval" is selected, shouldn't the relationship types list just show nothing under the expiration column?

--Ben

Berdir’s picture

Status: Needs work » Needs review

That's a separate issue, let's deal with that in #1103458: Remove columns from relationship type list. We could for example take those two values together in a single column and then display something like Approval: Yes (expiration of 6 days) / Yes / No.

If that was the only thing, then I'm going to commit the patch here..

BenK’s picture

Status: Needs review » Reviewed & tested by the community

Yes, that was the only thing. So go ahead and commit! :-)

--Ben

Berdir’s picture

Status: Reviewed & tested by the community » Fixed

Ok, commited.

Status: Fixed » Closed (fixed)

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