Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
drupal
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
304
Merge Requests
304
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
drupal
Commits
07600283
Commit
07600283
authored
Jul 22, 2010
by
Dries
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Patch
#601912
by sun: remove account fieldset on user account form.
parent
a03bf401
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
26 deletions
+0
-26
modules/user/user.module
modules/user/user.module
+0
-18
modules/user/user.test
modules/user/user.test
+0
-8
No files found.
modules/user/user.module
View file @
07600283
...
...
@@ -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
);
...
...
@@ -3499,20 +3495,6 @@ function user_register_form($form, &$form_state) {
return
$form
;
}
/**
* 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.
*
...
...
modules/user/user.test
View file @
07600283
...
...
@@ -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.'
));
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment