Index: modules/node/content_types.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/node/content_types.inc,v retrieving revision 1.64 diff -u -r1.64 content_types.inc --- modules/node/content_types.inc 26 Jan 2009 14:08:43 -0000 1.64 +++ modules/node/content_types.inc 21 Apr 2009 00:56:25 -0000 @@ -52,7 +52,9 @@ * Generates the node type editing form. */ function node_type_form(&$form_state, $type = NULL) { - drupal_add_js(drupal_get_path('module', 'node') .'/content_types.js'); + // Provide the node type form JavaScript. + $form['#attached_js'] = array(drupal_get_path('module', 'node') .'/content_types.js'); + if (!isset($type->type)) { // This is a new type. Node module managed types are custom and unlocked. $type = node_type_set_defaults(array('custom' => 1, 'locked' => 0)); @@ -102,13 +104,18 @@ '#type' => 'textarea', '#default_value' => $type->description, '#description' => t('A brief description of this content type. This text will be displayed as part of the list on the create content page.'), - ); + ); + + $form['additional_settings'] = array( + '#type' => 'vertical_tabs', + ); $form['submission'] = array( '#type' => 'fieldset', - '#title' => t('Submission form settings'), + '#title' => t('Submission settings'), '#collapsible' => TRUE, '#collapsed' => TRUE, + '#group' => 'additional_settings', ); $form['submission']['title_label'] = array( '#title' => t('Title field label'), @@ -147,6 +154,7 @@ '#title' => t('Workflow settings'), '#collapsible' => TRUE, '#collapsed' => TRUE, + '#group' => 'additional_settings', ); $form['workflow']['node_options'] = array('#type' => 'checkboxes', '#title' => t('Default options'), @@ -164,6 +172,7 @@ '#title' => t('Display settings'), '#collapsible' => TRUE, '#collapsed' => TRUE, + '#group' => 'additional_settings', ); $form['display']['node_submitted'] = array( '#type' => 'checkbox', Index: modules/node/content_types.js =================================================================== RCS file: /cvs/drupal/drupal/modules/node/content_types.js,v retrieving revision 1.2 diff -u -r1.2 content_types.js --- modules/node/content_types.js 18 Feb 2009 13:46:54 -0000 1.2 +++ modules/node/content_types.js 21 Apr 2009 00:56:25 -0000 @@ -2,7 +2,34 @@ (function($) { Drupal.behaviors.contentTypes = { - attach: function() { + attach: function(context) { + jQuery('fieldset#edit-submission', context).setSummary(function(context) { + var vals = []; + vals.push(Drupal.checkPlain(jQuery('#edit-title-label', context).val()) || Drupal.t('Requires a title')); + vals.push(Drupal.checkPlain(jQuery('#edit-body-label', context).val()) || Drupal.t('No body')); + return vals.join(', '); + }); + jQuery('fieldset#edit-workflow', context).setSummary(function(context) { + var vals = []; + $('input:checked', context).parent().each(function() { + vals.push(Drupal.checkPlain(jQuery(this).text())); + }); + if (!$('#edit-node-options-status', context).is(':checked')) { + vals.unshift(Drupal.t('Not published')); + } + return vals.join(', '); + }); + jQuery('fieldset#edit-display', context).setSummary(function(context) { + var vals = []; + $('input:checked', context).parent().each(function() { + vals.push(Drupal.checkPlain(jQuery(this).text())); + }); + if (!$('#edit-node-submitted', context).is(':checked')) { + vals.unshift(Drupal.t("Don't display post information")); + } + return vals.join(', '); + }); + if ($('#edit-type').val() == $('#edit-name').val().toLowerCase().replace(/[^a-z0-9]+/g, '_').replace(/_+/g, '_') || $('#edit-type').val() == '') { $('#edit-type-wrapper').hide(); $('#edit-name').keyup(function() { Index: modules/comment/comment.module =================================================================== RCS file: /cvs/drupal/drupal/modules/comment/comment.module,v retrieving revision 1.703 diff -u -r1.703 comment.module --- modules/comment/comment.module 20 Apr 2009 21:28:13 -0000 1.703 +++ modules/comment/comment.module 21 Apr 2009 00:56:25 -0000 @@ -511,6 +511,8 @@ '#title' => t('Comment settings'), '#collapsible' => TRUE, '#collapsed' => TRUE, + '#group' => 'additional_settings', + '#attached_js' => array(drupal_get_path('module', 'comment') . '/comment-node-type-form.js'), ); $form['comment']['comment'] = array( '#type' => 'radios', Index: modules/comment/comment-node-type-form.js =================================================================== RCS file: modules/comment/comment-node-type-form.js diff -N modules/comment/comment-node-type-form.js --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ modules/comment/comment-node-type-form.js 1 Jan 1970 00:00:00 -0000 @@ -0,0 +1,12 @@ +// $Id$ +(function($) { + +Drupal.behaviors.comment = { + attach: function(context, settings) { + jQuery('fieldset#edit-comment', context).setSummary(function(context) { + return Drupal.checkPlain(jQuery("input:checked[name='comment']", context).parent().text()); + }); + } +}; + +})(jQuery);