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.
This issue is part of meta issue #1931088: [META] Fixing tests
The location fieldset is nested inside an empty parent fieldset, which is probably not needed even with multiple locations.
Comment | File | Size | Author |
---|---|---|---|
#6 | location_validate_fieldset-1404870-6.patch | 6.14 KB | iva2k |
#4 | location-1404870.patch | 2.06 KB | Jolidog |
Comments
Comment #1
RumpledElf CreditAttribution: RumpledElf commentedThere's a setting in the admin for that field that says "Make the location box collapsible" but it doesn't do anything ...
Otherwise, I second having at least some option to not have fieldsets in fieldsets. Thinking a hook form alter is the go in the meantime.
Comment #2
Xomby CreditAttribution: Xomby commentedI got as far as adding
just under line 1868 in location.module, which removes the outer fieldset's title.
Full block now looks like:
Note-- you could swap the result from the $form[0] line with the $form line to remove the inner fieldset's title instead.
I'll have to dig into the code more to find out where the display function is, and it might require the rewrite or addition of a function to display/process a single location element instead of the current fieldset[]=>location element. (sigh)
Comment #3
sigent CreditAttribution: sigent commenteda temporary (but simple) solution using CSS:
"
fieldset.locations fieldset.location {border: 0; margin: 0; padding: 0}
fieldset.locations fieldset.location legend {display: none;}
"
Comment #4
Jolidog CreditAttribution: Jolidog commentedDid a quick patch, not sure if it the correct approach, but it's working for me.
Comment #5
OMD CreditAttribution: OMD commentedSame issue here. Double fieldset for just one field, make the form look awkward. Even removing the border and legend as in #3 helps a bit, but an awkward spacing is left over. Would be nice if there was a checkbox to remove the fieldset when not desired.
Comment #6
iva2k CreditAttribution: iva2k commentedImproved patch #3 (added a fix for non-collapsible fieldset problem). Potentially fixes #1044290: The method of making location_element elements collapsible is flawed.
Comment #7
podarokpostponed before tests fix
#1931088: [META] Fixing tests
Comment #8
podarok#1931088-3: [META] Fixing tests mostly fixed for 7.x-3.x branch
this one needs review
Comment #9
podarok#6 commited pushed to 7.x-3.x
thanks!
Good to see some tests here #1931088: [META] Fixing tests
Comment #10
RaulMuroc CreditAttribution: RaulMuroc commentedSo this has been pushed/commited, hasn't it? should we mark this as fixed or needs more testing?
Comment #10.0
RaulMuroc CreditAttribution: RaulMuroc commentedUpdated issue summary.