Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
b2e725c0
Commit
b2e725c0
authored
Aug 22, 2008
by
Dries
Browse files
- Patch
#296918
by JBrauer: clean up CSS/HTML of node form.
parent
c15bcc06
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/node/node.pages.inc
View file @
b2e725c0
...
...
@@ -176,7 +176,7 @@ function node_form(&$form_state, $node) {
'#title'
=>
t
(
'Authoring information'
),
'#collapsible'
=>
TRUE
,
'#collapsed'
=>
TRUE
,
'#weight'
=>
2
0
,
'#weight'
=>
9
0
,
);
$form
[
'author'
][
'name'
]
=
array
(
'#type'
=>
'textfield'
,
...
...
@@ -205,7 +205,7 @@ function node_form(&$form_state, $node) {
'#title'
=>
t
(
'Publishing options'
),
'#collapsible'
=>
TRUE
,
'#collapsed'
=>
TRUE
,
'#weight'
=>
2
5
,
'#weight'
=>
9
5
,
);
$form
[
'options'
][
'status'
]
=
array
(
'#type'
=>
'checkbox'
,
...
...
@@ -233,6 +233,7 @@ function node_form(&$form_state, $node) {
// Add the buttons.
$form
[
'buttons'
]
=
array
();
$form
[
'buttons'
][
'#weight'
]
=
100
;
$form
[
'buttons'
][
'submit'
]
=
array
(
'#type'
=>
'submit'
,
'#value'
=>
t
(
'Save'
),
...
...
@@ -328,34 +329,10 @@ function node_form_build_preview($form, &$form_state) {
function
theme_node_form
(
$form
)
{
$output
=
"
\n
<div class=
\"
node-form
\"
>
\n
"
;
// Admin form fields and submit buttons must be rendered first, because
// they need to go to the bottom of the form, and so should not be part of
// the catch-all call to drupal_render().
$admin
=
''
;
if
(
isset
(
$form
[
'author'
]))
{
$admin
.
=
" <div class=
\"
authored
\"
>
\n
"
;
$admin
.
=
drupal_render
(
$form
[
'author'
]);
$admin
.
=
" </div>
\n
"
;
}
if
(
isset
(
$form
[
'options'
]))
{
$admin
.
=
" <div class=
\"
options
\"
>
\n
"
;
$admin
.
=
drupal_render
(
$form
[
'options'
]);
$admin
.
=
" </div>
\n
"
;
}
$buttons
=
drupal_render
(
$form
[
'buttons'
]);
// Everything else gets rendered here, and is displayed before the admin form
// field and the submit buttons.
$output
.
=
" <div class=
\"
standard
\"
>
\n
"
;
$output
.
=
drupal_render
(
$form
);
$output
.
=
" </div>
\n
"
;
if
(
!
empty
(
$admin
))
{
$output
.
=
" <div class=
\"
admin
\"
>
\n
"
;
$output
.
=
$admin
;
$output
.
=
" </div>
\n
"
;
}
$output
.
=
$buttons
;
$output
.
=
"</div>
\n
"
;
return
$output
;
...
...
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