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.
Currently we have to do stuff like this:
$form['email_title'] = array(
'#type' => 'item',
'#title' => t('E-mails'),
);
$form['email'] = array(
'#type' => 'vertical_tabs',
);
...when it would be a lot nicer to be able to do it from within the vertical tabs element itself:
$form['email'] = array(
'#type' => 'vertical_tabs',
'#title' => t('E-mails'),
'#description' => t('A helpful description for the overall vertical tab element here.'),
);
Comment | File | Size | Author |
---|---|---|---|
#27 | drupal8.vertical-tabs-title.27.patch | 5.17 KB | sun |
#24 | drupal8.vertical-tabs-title.24.patch | 5.13 KB | sun |
#11 | drupal8.vertical-tabs-title.11.patch | 4.93 KB | sun |
#8 | drupal8.vertical-tabs-title.8.patch | 5.05 KB | sun |
#6 | drupal8.vertical-tabs-title.6.patch | 5.03 KB | sun |
Comments
Comment #1
Dave ReidComment #2
Dave ReidRest of core's vertical tab elements converted.
Comment #3
Dave ReidAdding tags for needing usability and markup reviews.
Comment #4
sunThis tweak could use a small code comment.
Duplicate newline.
Let's move the additional munging of #title_display right below the initial default code.
One wrapper too much. Let's simply add the 'vertical-tabs-panes' class to the outer wrapper. More than one container doesn't make much sense here.
Not sure whether this has any [valid] effect here. Can probably be removed.
If there's a meaning to 'attribute', then the only possible meaning I could see would be a 'title' attribute on the wrapping DIV.
Stale reference to "and no required marker".
Powered by Dreditor.
Comment #5
David_Rothstein CreditAttribution: David_Rothstein commentedThis has the "Needs usability testing" tag - what kind of testing does it need exactly?
Comment #6
sunI just stumbled over this in a contrib module.
I'd suggest to keep this simple and just get the job done.
Comment #8
sunFixed that test failure — of course, the #pre_render needs to check whether any tabs are accessible/visible.
This patch should come back green and could be considered ready.
Comment #9
sunFeedback, anyone?
Comment #10
sun#8: drupal8.vertical-tabs-title.8.patch queued for re-testing.
Comment #11
sunRe-rolled against HEAD.
Feedback, anyone?
Comment #12
sunComment #13
sunAnyone?
Comment #14
saltednut#11 applies cleanly to drupal-8.x-dev. I'm not finding any manual errors when viewing forms that contain vertical tabs around the dev site.
If patch is committed it would save ~3 lines for title assertions on vertical tabs.
Comment #15
sunWas that an RTBC? ;)
Comment #16
saltednutComment #17
sun#11: drupal8.vertical-tabs-title.11.patch queued for re-testing.
Comment #18
sun#11: drupal8.vertical-tabs-title.11.patch queued for re-testing.
Comment #19
sun#11: drupal8.vertical-tabs-title.11.patch queued for re-testing.
Comment #20
YesCT CreditAttribution: YesCT commentedManual testing. Looks find on blocks (admin/structure/block/manage/system/help/configure), account settings (admin/config/people/accounts), filters (admin/config/content/formats/filtered_html)
Content types like articles don't seems to have titles on the vertical tabs to convert. Still rtbc to me.
patch still applies with offsets.
Comment #21
YesCT CreditAttribution: YesCT commented#11: drupal8.vertical-tabs-title.11.patch queued for re-testing.
Comment #22
catch#11: drupal8.vertical-tabs-title.11.patch queued for re-testing.
Comment #24
sunRe-rolled against HEAD.
Comment #25
catch#24: drupal8.vertical-tabs-title.24.patch queued for re-testing.
Comment #27
sunHah, playing the re-roll monkey — so lucky to break my own patches :)
Comment #28
webchickThis looks like a nice feature/clean-up. We can commit it once we're under thresholds again.
Comment #29
webchickHm. Actually I guess catch has tried to re-test this several times so guess he's cool to commit this.
Committed and pushed to 8.x.
Comment #30
webchickDer. Needs a change notice.
Comment #31
sunChange notice: http://drupal.org/node/1886118