Issue #1181750 by Everett Zufelt, sun: Fixed Removal of 'Hidden' option in comment settings form may break programmatic form submissions.
parent
c9e40d59dc
commit
81b0109835
|
@ -1233,8 +1233,8 @@ function comment_form_node_form_alter(&$form, $form_state) {
|
||||||
// If the node doesn't have any comments, the "hidden" option makes no
|
// If the node doesn't have any comments, the "hidden" option makes no
|
||||||
// sense, so don't even bother presenting it to the user.
|
// sense, so don't even bother presenting it to the user.
|
||||||
if (empty($comment_count)) {
|
if (empty($comment_count)) {
|
||||||
unset($form['comment_settings']['comment']['#options'][COMMENT_NODE_HIDDEN]);
|
$form['comment_settings']['comment'][COMMENT_NODE_HIDDEN]['#access'] = FALSE;
|
||||||
unset($form['comment_settings']['comment'][COMMENT_NODE_HIDDEN]);
|
// Also adjust the description of the "closed" option.
|
||||||
$form['comment_settings']['comment'][COMMENT_NODE_CLOSED]['#description'] = t('Users cannot post comments.');
|
$form['comment_settings']['comment'][COMMENT_NODE_CLOSED]['#description'] = t('Users cannot post comments.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue