Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
For example, the reciprocal setting only needs to be visible when it is a one-way relationship type.
Check if there are others...
Comment | File | Size | Author |
---|---|---|---|
#3 | use_states.patch | 1.62 KB | Berdir |
Comments
Comment #1
BerdirComment #2
BenK CreditAttribution: BenK commentedThis is a good idea... would simplify things quite a bit.
Comment #3
BerdirAnd 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
Comment #4
BenK CreditAttribution: BenK commentedThe 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
Comment #5
BerdirThat'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..
Comment #6
BenK CreditAttribution: BenK commentedYes, that was the only thing. So go ahead and commit! :-)
--Ben
Comment #7
BerdirOk, commited.