--- subscriptions:subscriptions.module	2005-12-12 20:06:49.%N -0500     1.32+++ subscriptions:subscriptions.module	2005-12-17 22:39:59.%N -0500@@ -39,7 +39,18 @@   $mailevent .= "Alternativly, if you have the mailqueue module installed, you can send the messages ";   $mailevent .= "to that module for handling.";   if ( module_exist( 'mailqueue' ) ) {-    $output = form_radios( t( "Mailer Event" ), "subscriptions_event", variable_get( "subscriptions_event", "insert" ), array( "insert" => t( "On Comment Insert/Update" ), "queue" => t( "Send to mail queue" ) ) , t( $mailevent ) );+    // OLD FORMS API+    # $output = form_radios( t( "Mailer Event" ), "subscriptions_event", variable_get( "subscriptions_event", "insert" ), array( "insert" => t( "On Comment Insert/Update" ), "queue" => t( "Send to mail queue" ) ) , t( $mailevent ) );+    // NEW FORMS API+    $form_options = array( 'insert' => t( 'On Comment Insert/Update' ));+    $form['subscription_settings']['subscriptions_event'] = array(+      '#type'          => 'radios',+      '#title'         => t('Mailer event'),+      '#default_value' => variable_get( 'subscriptions_event', 'insert' ),+      '#options'       => $form_options,+      '#description'   => t( $mailevent )+    );+    $output = $form;   }   else {     $output = "Subscription notifications will be sent upon insert/update.  This should be ";@@ -57,7 +68,22 @@   switch ($type) {     case 'form':       if (user_access('maintain subscriptions') && $category == 'account') {-        return array(array('title' => t('Subscription settings'), 'data' => form_checkbox(t('Automatically subscribe to threads in which you post.'), 'subscriptions_auto', 1, isset($edit->subscriptions_auto) ? $edit->subscriptions_auto : $user->subscriptions_auto, t('Checking this box allows you to be automatically subscribe to any thread you create or post a comment to.'))));+        // OLD FORMS API +        # return array(array('title' => t('Subscription settings'), 'data' => form_checkbox(t('Automatically subscribe to threads in which you post.'), 'subscriptions_auto', 1, isset($edit->subscriptions_auto) ? $edit->subscriptions_auto : $user->subscriptions_auto, t('Checking this box allows you to be automatically subscribe to any thread you create or post a comment to.'))));+        // NEW FORMS API+        $form['subscriptions'] = array(+          '#type'       => 'fieldset', +          '#title'       => t('Subscription settings'), +          '#weight'      => 5, +          '#collapsible' => TRUE+        );+        $form['subscriptions']['subscriptions_auto'] = array(+          '#type'          => 'checkbox',+          '#title'         => t('Autosubscribe'),+          '#default_value' => isset($edit['subscriptions_auto']) ? $edit['subscriptions_auto'] : $user->subscriptions_auto,+          '#description'   => t('Checking this box allows you to be automatically subscribe to any thread you create or post a comment to.')+        );+        return $form;       }   } }@@ -71,8 +97,14 @@   foreach ($vocabularies as $vocabulary) {     $select[$vocabulary->vid] = $vocabulary->name;   }-  $output = form_select(t('Omitted vocabularies'), 'subscriptions_omitted_taxa', variable_get('subscriptions_omitted_taxa', array()), $select, t('Select vocabularies which should be <strong>omitted</strong> from subscription listings.'), '', 1);-  return $output;+  $form['sub_settings']['subscriptions_omitted_taxa'] = array(+    '#type'          => 'select',+    '#title'         => t('Omitted vocabularies'),+    '#default_value' => variable_get('subscriptions_omitted_taxa', array()),+    '#options'       => $select,+    '#description'   => t('Select vocabularies which should be <strong>omitted</strong> from subscription listings.')+  );+  return $form; }  /**