diff options
author | Dries Buytaert <dries@buytaert.net> | 2010-07-22 23:41:51 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2010-07-22 23:41:51 +0000 |
commit | 076002833cbb16e9214b3b72c6d020c7f067aa6f (patch) | |
tree | 71bfead4c586dfac50db7ed184b3a48b06770876 /modules | |
parent | a03bf401b6bcfbff218c4913fd0cb6f8a7301ee8 (diff) | |
download | brdo-076002833cbb16e9214b3b72c6d020c7f067aa6f.tar.gz brdo-076002833cbb16e9214b3b72c6d020c7f067aa6f.tar.bz2 |
- Patch #601912 by sun: remove account fieldset on user account form.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/user/user.module | 18 | ||||
-rw-r--r-- | modules/user/user.test | 8 |
2 files changed, 0 insertions, 26 deletions
diff --git a/modules/user/user.module b/modules/user/user.module index 3b3c6b2b4..3fe86b4e2 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -960,8 +960,6 @@ function user_account_form(&$form, &$form_state) { // Account information. $form['account'] = array( - '#type' => 'fieldset', - '#title' => t('Account information'), '#weight' => -10, ); // Only show name field on registration form or user can change own username. @@ -3476,8 +3474,6 @@ function user_register_form($form, &$form_state) { $form['#attached']['library'][] = array('system', 'cookie'); $form['#attributes']['class'][] = 'user-info-from-cookie'; - $form['#pre_render'] = array('user_register_form_pre_render'); - // Start with the default user account fields. user_account_form($form, $form_state); @@ -3500,20 +3496,6 @@ function user_register_form($form, &$form_state) { } /** - * Form pre-render callback to clean up the user_register_form. - * - * If the "account" fieldset is the only element at the top level (apart from - * the submit button), its borders are hidden for aesthetic reasons. - */ -function user_register_form_pre_render($form) { - $visible_children = element_get_visible_children($form); - if (!count(array_diff($visible_children, array('account', 'submit')))) { - $form['account']['#theme_wrappers'] = array(); - } - return $form; -} - -/** * Submit handler for the user registration form. * * This function is shared by the installation form and the normal registration form, diff --git a/modules/user/user.test b/modules/user/user.test index da6443585..ad6020fa4 100644 --- a/modules/user/user.test +++ b/modules/user/user.test @@ -136,14 +136,6 @@ class UserRegistrationTestCase extends DrupalWebTestCase { $this->assertEqual($new_user->language, '', t('Correct language field.')); $this->assertEqual($new_user->picture, '', t('Correct picture field.')); $this->assertEqual($new_user->init, $mail, t('Correct init field.')); - - // Make the user timezone configurable, which will create a second fieldset - // on the registration page and cause the account information elements to - // be put in a fieldset. - variable_set('user_default_timezone', DRUPAL_USER_TIMEZONE_SELECT); - $this->drupalLogout(); - $this->drupalGet('user/register'); - $this->assertText(t('Account information'), t('Account settings fieldset was not hidden.')); } } |