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
a5e3fac8
Commit
a5e3fac8
authored
Apr 18, 2012
by
catch
Browse files
Issue
#1159002
by sun: Show comment field first and before contact info in comment form.
parent
aab45ade
Changes
1
Hide whitespace changes
Inline
Side-by-side
core/modules/comment/comment.module
View file @
a5e3fac8
...
@@ -1711,20 +1711,16 @@ function comment_form($form, &$form_state, Comment $comment) {
...
@@ -1711,20 +1711,16 @@ function comment_form($form, &$form_state, Comment $comment) {
$form
+=
$form_state
[
'comment_preview'
];
$form
+=
$form_state
[
'comment_preview'
];
}
}
$form
[
'author'
]
=
array
(
'#weight'
=>
10
,
);
// Display author information in a fieldset for comment moderators.
// Display author information in a fieldset for comment moderators.
if
(
$is_admin
)
{
if
(
$is_admin
)
{
$form
[
'author'
]
=
array
(
$form
[
'author'
]
+
=
array
(
'#type'
=>
'fieldset'
,
'#type'
=>
'fieldset'
,
'#title'
=>
t
(
'Administration'
),
'#title'
=>
t
(
'Administration'
),
'#collapsible'
=>
TRUE
,
'#collapsible'
=>
TRUE
,
'#collapsed'
=>
TRUE
,
'#collapsed'
=>
TRUE
,
'#weight'
=>
-
2
,
);
}
else
{
// Sets the author form elements above the subject.
$form
[
'author'
]
=
array
(
'#weight'
=>
-
2
,
);
);
}
}
...
@@ -1825,7 +1821,6 @@ function comment_form($form, &$form_state, Comment $comment) {
...
@@ -1825,7 +1821,6 @@ function comment_form($form, &$form_state, Comment $comment) {
'#maxlength'
=>
64
,
'#maxlength'
=>
64
,
'#default_value'
=>
$comment
->
subject
,
'#default_value'
=>
$comment
->
subject
,
'#access'
=>
variable_get
(
'comment_subject_field_'
.
$node
->
type
,
1
)
==
1
,
'#access'
=>
variable_get
(
'comment_subject_field_'
.
$node
->
type
,
1
)
==
1
,
'#weight'
=>
-
1
,
);
);
// Used for conditional validation of author fields.
// Used for conditional validation of author fields.
...
@@ -1858,13 +1853,11 @@ function comment_form($form, &$form_state, Comment $comment) {
...
@@ -1858,13 +1853,11 @@ function comment_form($form, &$form_state, Comment $comment) {
'#type'
=>
'submit'
,
'#type'
=>
'submit'
,
'#value'
=>
t
(
'Save'
),
'#value'
=>
t
(
'Save'
),
'#access'
=>
(
$comment
->
cid
&&
user_access
(
'administer comments'
))
||
variable_get
(
'comment_preview_'
.
$node
->
type
,
DRUPAL_OPTIONAL
)
!=
DRUPAL_REQUIRED
||
isset
(
$form_state
[
'comment_preview'
]),
'#access'
=>
(
$comment
->
cid
&&
user_access
(
'administer comments'
))
||
variable_get
(
'comment_preview_'
.
$node
->
type
,
DRUPAL_OPTIONAL
)
!=
DRUPAL_REQUIRED
||
isset
(
$form_state
[
'comment_preview'
]),
'#weight'
=>
19
,
);
);
$form
[
'actions'
][
'preview'
]
=
array
(
$form
[
'actions'
][
'preview'
]
=
array
(
'#type'
=>
'submit'
,
'#type'
=>
'submit'
,
'#value'
=>
t
(
'Preview'
),
'#value'
=>
t
(
'Preview'
),
'#access'
=>
(
variable_get
(
'comment_preview_'
.
$node
->
type
,
DRUPAL_OPTIONAL
)
!=
DRUPAL_DISABLED
),
'#access'
=>
(
variable_get
(
'comment_preview_'
.
$node
->
type
,
DRUPAL_OPTIONAL
)
!=
DRUPAL_DISABLED
),
'#weight'
=>
20
,
'#submit'
=>
array
(
'comment_form_build_preview'
),
'#submit'
=>
array
(
'comment_form_build_preview'
),
);
);
...
...
Write
Preview
Supports
Markdown
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