summaryrefslogtreecommitdiff
path: root/modules/comment
diff options
context:
space:
mode:
Diffstat (limited to 'modules/comment')
-rw-r--r--modules/comment/comment-node-form.js19
-rw-r--r--modules/comment/comment.module2
2 files changed, 21 insertions, 0 deletions
diff --git a/modules/comment/comment-node-form.js b/modules/comment/comment-node-form.js
index 20d8729f4..0f51884a2 100644
--- a/modules/comment/comment-node-form.js
+++ b/modules/comment/comment-node-form.js
@@ -7,6 +7,25 @@ Drupal.behaviors.commentFieldsetSummaries = {
$('fieldset#edit-comment-settings', context).setSummary(function (context) {
return Drupal.checkPlain($('input:checked', context).parent().text());
});
+ // Provide the summary for the node type form.
+ $('fieldset#edit-comment', context).setSummary(function(context) {
+ var vals = [];
+
+ // Default comment setting.
+ vals.push($("select[name='comment'] option:selected", context).text());
+
+ // Threading.
+ var threading = $("input[name='comment_default_mode']:checked", context).parent().text();
+ if (threading) {
+ vals.push(threading);
+ }
+
+ // Comments per page.
+ var number = $("select[name='comment_default_per_page'] option:selected", context).val();
+ vals.push(Drupal.t('@number comments per page', {'@number': number}));
+
+ return Drupal.checkPlain(vals.join(', '));
+ });
}
};
diff --git a/modules/comment/comment.module b/modules/comment/comment.module
index 18653611c..b06b186a4 100644
--- a/modules/comment/comment.module
+++ b/modules/comment/comment.module
@@ -932,6 +932,8 @@ function comment_form_node_type_form_alter(&$form, $form_state) {
'#title' => t('Comment settings'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
+ '#group' => 'additional_settings',
+ '#attached_js' => array(drupal_get_path('module', 'comment') . '/comment-node-form.js'),
);
$form['comment']['comment_default_mode'] = array(
'#type' => 'checkbox',