? default_vertical_tab.patch
? generate_stylesheet.inc
? vertical-tabs-cck.patch
? vertical-tabs-install.patch
Index: vertical_tabs.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/vertical_tabs/vertical_tabs.module,v
retrieving revision 1.1.2.15
diff -u -p -r1.1.2.15 vertical_tabs.module
--- vertical_tabs.module	6 Jan 2009 03:47:04 -0000	1.1.2.15
+++ vertical_tabs.module	11 Jan 2009 16:27:41 -0000
@@ -36,6 +36,26 @@ function vertical_tabs_form_alter(&$form
 
     // The javascript to add to the page.
     $settings = array();
+
+    $default_tab = vertical_tabs_default_tab($node_type);
+    if (strlen($default_tab)) {
+      $form['vertical_tab_default'] = array(
+        '#type' => 'fieldset',
+        '#title' => $default_tab,
+        '#weight' => -100,
+      );
+      // Iterate through the form, finding *non* fieldsets.
+      foreach (element_children($form) as $delta => $key) {
+        if (!in_array($key, $fieldsets) && 
+          ($key !== 'vertical_tab_default') &&
+          (!isset($form[$key]['#access']) || $form[$key]['#access'] != FALSE)) {
+          $form['vertical_tab_default'][$key] = $form[$key];
+          unset($form[$key]);
+        }
+      }
+      array_push($fieldsets, 'vertical_tab_default');
+    }
+
     // Iterate through the form, finding fieldsets.
     foreach (element_children($form) as $delta => $key) {
       // We need to make sure that the element we have is a fieldset
@@ -160,6 +180,12 @@ function vertical_tabs_node_type_form($n
     '#collapsed' => TRUE,
     '#description' => t('The selected fieldsets will be rendered as vertical tabs for this content type. The tabs are rendered in the same version as the original form\'s fieldsets.'),
   );
+  $form['vertical_tabs']['vertical_tabs_default_tab'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Name of Default Vertical Tab'),
+    '#description' => t('Leave blank to keep top level form elements like title and body outside of Vertical Tabs.'),
+    '#default_value' => vertical_tabs_default_tab($node_type),
+  );
   $form['vertical_tabs']['vertical_tabs_fieldsets'] = array(
     '#type' => 'checkboxes',
     '#options' => $fieldsets,
@@ -245,6 +271,13 @@ function vertical_tabs_fieldsets($node_t
 }
 
 /**
+ * Retrieve the name of the default tab if it's set.
+ */
+function vertical_tabs_default_tab($node_type) {
+  return variable_get('vertical_tabs_default_tab_' . $node_type, '');
+}
+
+/**
  * After build function to add vertical tabs JS and CSS to the form.
  */
 function theme_vertical_tabs(&$form_element) {
