This no longer works: (go find out yourself, why)
user.module: user_register_form():
// If the "account" fieldset is the only element at the top level, its
// borders are hidden for aesthetic reasons. We do not remove the fieldset but
// preserve the form structure so that modules implementing
// hook_form_FORM_ID_alter() know where to find the basic elements.
if (count(element_children($form)) == 1) {
$form['account']['#type'] = 'markup';
}
What do we do about it?
1) Turn the #type fieldset into markup by default and remove this snippet. The account fields are usually display first anyway. (But keep the structure, so people can re-inject and move it around).
2) Make it work again by introducing user_register_form_after_build().
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | user-account-fieldset.garland.png | 36.59 KB | sun |
| #7 | user-account-fieldset.png | 16.08 KB | sun |
| #6 | drupal.user-account-fieldset.6.patch | 2.68 KB | sun |
| #3 | drupal.user-account-fieldset.3.patch | 1.66 KB | sun |
Comments
Comment #1
sun.
Comment #2
Bojhan commentedLets do 1#? Aslong as it doesnt do the fieldset?
Comment #3
sunheh, the code seems to have been fixed in the meantime, but got wrecked by yet another change since then.
So this patch does 1) never show a fieldset for the primary user account information. That's clear and predictable, and follows UX changes we applied to other forms throughout core already.
http://api.drupal.org/api/function/element_get_visible_children/7 is no longer invoked with this patch, but the function may be useful for someone. Also, we're past API freeze, so can no longer be removed.
Comment #5
Bojhan commentedAs you reroll - can you trow in a image?
Comment #6
sunI don't really understand those test failures, can't replicate them locally. Anyway, one test needed to be corrected to no longer expect this fieldset.
Here's how it looks: (note, considered to capture in Garland, but thought that it's also worth to mention the design hiccup in Bartik)
Comment #7
sund'oh. :P
Comment #8
Bojhan commentedThat is ehm wierd.
Comment #9
sunwell, much fancier it is:
Comment #10
Bojhan commentedSo is Bartik fixable, or is it a not-related to this issue - issue.
Comment #12
sun#6: drupal.user-account-fieldset.6.patch queued for re-testing.
Comment #13
sunThat's not related to this issue. Bartik has a lot of layout/design issues, which are hopefully resolved soon.
I'm not sure what's up with the bot... those failures are entirely unrelated to this patch, and we're getting completely different failures for each patch here. I suspect one of the testing clients must be broken.
Comment #14
sunThe patch came back green now.
Comment #15
Bojhan commentedRTBC it is then.
Comment #16
dries commentedCommitted to CVS HEAD. Thanks.