Closed (fixed)
Project:
Field Group
Version:
7.x-1.x-dev
Component:
User interface
Priority:
Minor
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
12 May 2011 at 12:31 UTC
Updated:
14 May 2012 at 13:56 UTC
Jump to comment: Most recent file
Comments
Comment #1
Stalski commentedCan you explain what you mean. Horizontal tabs is ported from vertical tabs. I don't see any difference there.
Does the problem occur on verticals too?
Comment #2
fietserwinI'm sorry for the confusion.
In the UI ("manage fields" or "manage display" tab of content types) you can define a label for a "horizontal tabs group". This is label is not used during displaying either the create/edit form for a new node or when a node is being shown. At the same time a non-descriptive h2 header is added in front of a group of horizontal tabs stating that "horizontal tabs are following" (line 902, function theme_horizontal_tabs, file field_group.module).
My idea is to use the label in the h2 header instead of the text t('Horizontal Tabs'). Looking with a debugger, I noticed that the label is not available in the theme function so the field_group_field_group_pre_render function should add it. The proposed patch probably better explains the idea.
Notes:
- You could do the same for vertical tabs, but as the theme function is in core that would also need a change over there.
- If you don't want to differentiate between vertical and horizontal tabs, you should at least add the #title elements in the prerender function, so people can overrule the theme function and have that info available in their theme function.
- If you do accept all of this patch, I will propose a similar change for D8 core for the vertical tabs theme function.
- I used check_plain, not filter_xss_admin. Form element labels on node edit are processed using filter_xss_admin, but field labels on node show are processed using check_plain. I guess that check_plain for both cases suffices here.
Comment #3
Stalski commentedPushed to git
thx for the patch.
Comment #5
fraweg commentedHello,
can everyone do a patch for vertical tabs too? I am not fit in this, but I need a header above the tab-group.
Thanks in advanced!
Frank
Comment #6
hanoii@fraweg or anybody else needing vertical tabs titles feel free to try patches at #1577900: Use field group label in h2 above vertical tabs group