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.
Follow-up from #1840980: [meta] Bootstrap 3.0.
The closest thing I could find that somewhat "resembles" fieldsets, is a panels w/header (http://getbootstrap.com/components/#panels). Not to be confused with the panels module ;)
Comment | File | Size | Author |
---|---|---|---|
#11 | bootstrap-fieldsets-are-unstyled-2094297-11.patch | 14.17 KB | markhalliwell |
#11 | interdiff.txt | 10.3 KB | markhalliwell |
#8 | bootstrap_panels.jpg | 50.85 KB | markhalliwell |
#7 | bootstrap-fieldsets-are-unstyled-2094297-6.patch | 4.54 KB | markhalliwell |
#7 | interdiff.txt | 3.94 KB | markhalliwell |
Comments
Comment #1
markhalliwellA screenshot example: https://www.monosnap.com/image/ZSwoxIIXrpczOLsjlcAx9tEeD.png
Comment #2
markhalliwellAlso relevant: http://getbootstrap.com/javascript/#collapse
Comment #3
tr33m4n CreditAttribution: tr33m4n commentedI like the idea of using the panels styling as fieldsets (if that's what this is implying). Was thinking of doing this myself on a project I was working on... Will see if I can spare time to put in a patch
Comment #4
tr33m4n CreditAttribution: tr33m4n commentedPreliminary patch that adds classes to fieldset. Need to figure out the best way of adding collapsible js and doesn't seem right removing
<label>
, probably would be best to override the bootstrap styles insteadComment #5
tr33m4n CreditAttribution: tr33m4n commentedIt does look tidier however with the panel styles
Comment #6
markhalliwellOk here's my attempt at utilizing existing JS that is loaded from Bootstrap (collapsible).
Comment #7
markhalliwellHmm, let's try this again without removing a previous commit
Comment #8
markhalliwellScreenshot:
Comment #9
markhalliwellI put some @todos in for figuring out vertical_tabs (which are overridden by this patch). I created a follow-up issue to deal with them: #2094409: Figure out how to theme vertical_tabs properly.
Comment #10
tr33m4n CreditAttribution: tr33m4n commentedAppear to be getting this error on the login page
Notice: Undefined index: #title in bootstrap_preprocess_bootstrap_panel() (line 251 of /sites/all/themes/bootstrap/includes/form.inc)
Comment #11
markhalliwellI fixed the error in #10. I also added some touch-ups to some CSS/template file to make the entire panel header (a tag) clickable. Put in some JS to prevent the default click on a.collapsible elements so the #hash links (for no-js fallback) don't actually move the page around if JS is enabled. If someone can review and RTBC this, I'd like to get this in asap.
Comment #12
markhalliwellI've decided to just push this (to keep momentum going). If any regressions are found, open a new issue.
Committed a28e08a to 7.x-3.x.
Comment #13
tr33m4n CreditAttribution: tr33m4n commentedTesting at the moment, no problems as of yet
Comment #14
tr33m4n CreditAttribution: tr33m4n commentedAlthough this change is visually better, I do think that removing the
<label>
element from the fieldset is a bad idea in terms of accessibility, screen readers etc. Hence my previous hesitations and questions about whether this could be a css styling rather than a complete reworkComment #15
markhalliwellI'd rather just keep to what BS examples show (for now). I really don't think accessibility is an issue here.
Comment #16
tr33m4n CreditAttribution: tr33m4n commentedOk cool :)
Comment #17
markhalliwell