Index: signup.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/signup/signup.module,v
retrieving revision 1.146
diff -u -r1.146 signup.module
--- signup.module	2 Oct 2008 16:17:51 -0000	1.146
+++ signup.module	6 Oct 2008 12:39:38 -0000
@@ -385,6 +385,7 @@
  */
 function signup_alter_node_type_form($form_id, &$form) {
   $type = $form['old_type']['#value'];
+  $default_option = variable_get('signup_node_default_state_'. $type, 'disabled');
   $form['workflow']['signup_node_default_state'] = array(
     '#type' => 'radios',
     '#title' => t('Signup options'),
@@ -394,8 +395,31 @@
       'enabled_on' => t('Enabled (on by default)'),
     ),
     '#default_value' => variable_get('signup_node_default_state_'. $type, 'disabled'),
-    '#description' => t('If %disabled is selected, signups will not be possible for this content type. If %allowed_off is selected, signups will be off by default, but users with the %admin_all_signups permission will be able to allow signups for specific posts of this content type. If %enabled_on is selected, users will be allowed to signup for this content type unless an administrator disbles signups on specific posts.', array('%disabled' => t('Disabled'), '%allowed_off' => t('Allowed (off by default)'), '%enabled_on' => t('Enabled (on by default)'), '%admin_all_signups' => t('administer all signups'))),
+    '#description' => t('If %disabled is selected, signups will not be possible for this content type. If %allowed_off is selected, signups will be off by default, but users with the %admin_all_signups permission will be able to allow signups for specific posts of this content type. If %enabled_on is selected, users will be allowed to signup for this content type unless an administrator disbles signups on specific posts.', array('%disabled' => t('Disabled'), '%allowed_off' => t('Allowed (off by default)'), '%enabled_on' => t('Enabled (on by default)'), '%admin_all_signups' => t('administer all signups'))).'<div class="js-hide">'. t('If disabled, all of the other signup settings will be ignored.') .'</div>',
+      '#prefix' => '<div class="signup-options-radios">',
+      '#suffix' => '</div>',
+  );
+  
+  // If JS is enabled, signup.css will hide all the settings on page
+  // load if signups aren't enabled on this node.
+  $settings_class = "signup-node-type-settings";
+  if ($default_option == 'disabled' ) {
+    $settings_class .= " js-hide";
+  }
+
+  // Add the actual settings.  We wrap this in a div to make it easy
+  // to use jQuery to hide these settings when signups are disabled.
+  drupal_add_js(drupal_get_path('module', 'signup') .'/signup.js');
+  drupal_add_css(drupal_get_path('module', 'signup') .'/signup.css');
+  $form['workflow']['node_type_settings'] = array(
+    '#type' => 'fieldset',
+    '#title' => t('Signup settings'),
+    '#collapsible' => true,
+    '#collapsed' => true,
+    '#prefix' => '<div class="'. $settings_class .'">',
+    '#suffix' => '</div>',
   );
+  $form['workflow']['node_type_settings']['settings'] = _signup_admin_form(NULL, false, $type);
 }
 
 /**
@@ -1775,13 +1799,15 @@
  *   Boolean flag indicating if this node (or site) has signup-aware
  *   date functionality, which is required for reminder emails to be in
  *   the form.
+ * @param $type
+ *   The name of the node type (if we are editing node type settings). 
  *
  * @return
  *   The form array for the per-node signup settings.
  *
  * @ingroup signup_internal
  */
-function _signup_admin_form($node = NULL, $has_date = FALSE) {
+function _signup_admin_form($node = NULL, $has_date = FALSE, $type = NULL) {
   if (module_exists('token')) {
     $signup_token_description = t('Supported string substitutions: %event, %eventurl, %time, %username, %useremail, %info (user signup information), and any tokens in the %replacement_tokens list.', array('%replacement_tokens' => t('Replacement tokens')));
   }
Index: signup.js
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/signup/signup.js,v
retrieving revision 1.3
diff -u -r1.3 signup.js
--- signup.js	13 Jul 2007 07:54:58 -0000	1.3
+++ signup.js	6 Oct 2008 12:39:36 -0000
@@ -11,9 +11,22 @@
   });
 };
 
+/**
+ * On a node type settings form, if the "Signup options" radios are 
+ * set to "Allowed" or "Enabled", then show the other signup-specific 
+ * settings, otherwise, hide them.
+ */
+Drupal.signupShowNodeTypeSettingsAutoAttach = function () {
+  $('div.signup-options-radios input[@type=radio]').click(function () {
+    var opt = {'disabled':0, 'allowed_off':1, 'enabled_on':2};
+    $('div.signup-node-type-settings')[['hide', 'show', 'show'][opt[this.value]]]();
+  });
+};
+
 // Global killswitch.
 if (Drupal.jsEnabled) {
   $(function() {
     Drupal.signupShowSettingsAutoAttach();
+    Drupal.signupShowNodeTypeSettingsAutoAttach();
   });
 }
