? .git
? .gitignore
Index: uc_cart/uc_cart.admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/ubercart/uc_cart/uc_cart.admin.inc,v
retrieving revision 1.19
diff -u -p -r1.19 uc_cart.admin.inc
--- uc_cart/uc_cart.admin.inc	16 Feb 2011 07:41:04 -0000	1.19
+++ uc_cart/uc_cart.admin.inc	21 Feb 2011 21:24:29 -0000
@@ -283,135 +283,132 @@ function uc_cart_checkout_settings_overv
  * @ingroup forms
  */
 function uc_cart_checkout_settings_form($form, &$form_state) {
+  $form['checkout-settings'] = array('#type' => 'vertical_tabs');
+
   $form['general'] = array(
     '#type' => 'fieldset',
-    '#title' => t('General checkout settings'),
-    '#summary callback' => 'uc_summarize_form',
+    '#title' => t('Basic settings'),
+    '#group' => 'checkout-settings',
   );
   $form['general']['uc_checkout_enabled'] = array(
     '#type' => 'checkbox',
     '#title' => t('Enable checkout (disable to only use third party checkout service like PayPal Express Checkout).'),
-    '#summary callback' => 'uc_summarize_checkbox',
-    '#summary arguments' => array(
-      t('Ubercart checkout is enabled.'),
-      t('Ubercart checkout is disabled.'),
-    ),
     '#default_value' => variable_get('uc_checkout_enabled', TRUE),
   );
   $form['general']['uc_checkout_anonymous'] = array(
     '#type' => 'checkbox',
     '#title' => t('Enable anonymous checkout (users can checkout without logging in).'),
-    '#summary callback' => 'uc_summarize_checkbox',
-    '#summary arguments' => array(
-      t('Anonymous checkout is enabled.'),
-      t('Anonymous checkout is disabled.'),
-    ),
     '#default_value' => variable_get('uc_checkout_anonymous', TRUE),
   );
   $form['general']['uc_cart_delivery_not_shippable'] = array(
     '#type' => 'checkbox',
     '#title' => t('Hide shipping information when possible for carts with no shippable items.'),
-    '#summary callback' => 'uc_summarize_checkbox',
-    '#summary arguments' => array(
-      t('Shipping fields are hidden when applicable.'),
-      t('Shipping fields are always shown.'),
-    ),
     '#default_value' => variable_get('uc_cart_delivery_not_shippable', TRUE),
   );
-
-  $form['pane_settings'] = array(
-    '#type' => 'fieldset',
-    '#title' => t('Checkout pane display options'),
-    '#summary callback' => 'uc_summarize_form',
-  );
-  $form['pane_settings']['uc_use_next_buttons'] = array(
+  $form['general']['uc_use_next_buttons'] = array(
     '#type' => 'checkbox',
     '#title' => t('Use collapsing checkout panes with next buttons during checkout.'),
-    '#summary callback' => 'uc_summarize_checkbox',
-    '#summary arguments' => array(
-      t('Checkout panes are collapsed with next buttons.'),
-      t('Checkout panes are expanded by default.'),
-    ),
     '#default_value' => variable_get('uc_use_next_buttons', FALSE),
   );
-  $form['pane_settings']['uc_collapse_current_pane'] = array(
+  $form['general']['uc_collapse_current_pane'] = array(
     '#type' => 'checkbox',
     '#title' => t('Collapse a pane when its next button is clicked.'),
-    '#summary callback' => 'uc_summarize_checkbox',
-    '#summary arguments' => array(
-      t('Collapsible panes will collapse when their next buttons are clicked.'),
-      t('Collapsible panes will not collapse when their next buttons are clicked.'),
-    ),
     '#default_value' => variable_get('uc_collapse_current_pane', TRUE),
   );
 
+  $form['instructions'] = array(
+    '#type' => 'fieldset',
+    '#title' => t('Instruction messages'),
+    '#group' => 'checkout-settings',
+  );
+  $form['instructions']['uc_checkout_instructions'] = array(
+    '#type' => 'textarea',
+    '#title' => t('Checkout instructions'),
+    '#description' => t('Provide instructions for customers at the top of the checkout screen.'),
+    '#default_value' => variable_get('uc_checkout_instructions', ''),
+    '#rows' => 3,
+  );
+  $form['instructions']['uc_checkout_review_instructions'] = array(
+    '#type' => 'textarea',
+    '#title' => t('Checkout review instructions'),
+    '#description' => t('Provide instructions for customers at the top of the checkout review screen.'),
+    '#default_value' => variable_get('uc_checkout_review_instructions', uc_get_message('review_instructions')),
+    '#rows' => 3,
+  );
+
   $form['completion'] = array(
     '#type' => 'fieldset',
-    '#title' => t('Checkout completion settings'),
-    '#summary callback' => 'uc_summarize_form',
+    '#title' => t('Completion settings'),
+    '#group' => 'checkout-settings',
   );
   $form['completion']['uc_new_customer_email'] = array(
     '#type' => 'checkbox',
     '#title' => t('Send new customers a separate e-mail with their account details.'),
-    '#summary callback' => 'uc_summarize_checkbox',
-    '#summary arguments' => array(
-      t('New customers receive an e-mail with their account details.'),
-      t('New customers will only see their details in their initial order e-mail.')
-    ),
     '#default_value' => variable_get('uc_new_customer_email', TRUE),
   );
   $form['completion']['uc_new_customer_login'] = array(
     '#type' => 'checkbox',
     '#title' => t('Login users when new customer accounts are created at checkout.'),
-    '#summary callback' => 'uc_summarize_null',
     '#default_value' => variable_get('uc_new_customer_login', FALSE),
   );
   $form['completion']['uc_new_customer_status_active'] = array(
     '#type' => 'checkbox',
     '#title' => t('New customer accounts will be set to active.'),
     '#description' => t('Uncheck to create new accounts but make them blocked.'),
-    '#summary callback' => 'uc_summarize_checkbox',
-    '#summary arguments' => array(
-      t('New customer account status will be active.'),
-      t('New customer account status will be blocked.'),
-    ),
     '#default_value' => variable_get('uc_new_customer_status_active', TRUE),
   );
   $form['completion']['uc_cart_checkout_complete_page'] = array(
     '#type' => 'textfield',
     '#title' => t('Alternate checkout completion page'),
     '#description' => t('Leave blank to use the default completion page (recommended).'),
-    '#summary' => variable_get('uc_cart_checkout_complete_page', '') ? t('Checkout completion page has been set to <a href="!url">!url</a>.', array('!url' => variable_get('uc_cart_checkout_complete_page', ''))) : t('Checkout completion page will be the default page.'),
     '#default_value' => variable_get('uc_cart_checkout_complete_page', ''),
     '#field_prefix' => url(NULL, array('absolute' => TRUE)) . (variable_get('clean_url', 0) ? '' : '?q='),
     '#size' => 16,
   );
 
-  return system_settings_form($form);
-}
-
-/**
- * Summarizes cart and checkout panes.
- *
- * Although this function is called 'cart_panes', it also operates on
- * checkout panes, which are structured the same way.
- *
- * @param $form
- *   The form passed from the summarizer.
- * @param $panes
- *   Any array of cart/checkout panes.
- *
- * @return
- *   An array of summary information.
- */
-function _uc_cart_panes_summarize($form, $panes) {
-  $items = array();
-
-  foreach ($panes as $pane) {
-    $items[] = t('@title is @enabled.', array('@title' => $pane['title'], '@enabled' => $pane['enabled'] ? t('enabled') : t('disabled')));
-  }
+  $form['completion_messages'] = array(
+    '#type' => 'fieldset',
+    '#title' => t('Completion messages'),
+    '#description' => t('You may use <a href="!url">order, store, and site tokens</a> in these messages.', array('!url' => url('admin/store/help/tokens'))),
+    '#group' => 'checkout-settings',
+  );
+  $form['completion_messages']['uc_msg_order_submit'] = array(
+    '#type' => 'textarea',
+    '#title' => t('Message header'),
+    '#description' => t('Header for message displayed after a user checks out.'),
+    '#default_value' => variable_get('uc_msg_order_submit', uc_get_message('completion_message')),
+    '#rows' => 3,
+  );
+  $form['completion_messages']['uc_msg_order_logged_in'] = array(
+    '#type' => 'textarea',
+    '#title' => t('Logged in users'),
+    '#description' => t('Message displayed upon checkout for a user who is logged in.'),
+    '#default_value' => variable_get('uc_msg_order_logged_in', uc_get_message('completion_logged_in')),
+    '#rows' => 3,
+  );
+  $form['completion_messages']['uc_msg_order_existing_user'] = array(
+    '#type' => 'textarea',
+    '#title' => t('Existing users'),
+    '#description' => t("Message displayed upon checkout for a user who has an account but wasn't logged in."),
+    '#default_value' => variable_get('uc_msg_order_existing_user', uc_get_message('completion_existing_user')),
+    '#rows' => 3,
+  );
+  $form['completion_messages']['uc_msg_order_new_user'] = array(
+    '#type' => 'textarea',
+    '#title' => t('New users'),
+    '#description' => t("Message displayed upon checkout for a new user whose account was just created. You may use the special tokens !new_username for the username of a newly created account and !new_password for that account's password."),
+    '#default_value' => variable_get('uc_msg_order_new_user', uc_get_message('completion_new_user')),
+    '#rows' => 3,
+  );
+  $form['completion_messages']['uc_msg_continue_shopping'] = array(
+    '#type' => 'textarea',
+    '#title' => t('Continue shopping message'),
+    '#description' => t('Message displayed upon checkout to direct customers to another part of your site.'),
+    '#default_value' => variable_get('uc_msg_continue_shopping', uc_get_message('continue_shopping')),
+    '#rows' => 3,
+  );
 
-  return $items;
+  return system_settings_form($form);
 }
 
 /**
@@ -425,9 +422,8 @@ function uc_cart_checkout_panes_form($fo
   $form['panes'] = array(
     '#theme' => 'uc_pane_sort_table',
     '#pane_prefix' => 'uc_pane',
-    '#summary callback' => '_uc_cart_panes_summarize',
-    '#summary arguments' => array($panes),
   );
+  $form['pane-settings'] = array('#type' => 'vertical_tabs');
   foreach ($panes as $pane) {
     $form['panes'][$pane['id']]['uc_pane_' . $pane['id'] . '_enabled'] = array(
       '#type' => 'checkbox',
@@ -446,10 +442,8 @@ function uc_cart_checkout_panes_form($fo
     if (is_array($pane_settings)) {
       $form['pane_' . $pane['id']] = array(
         '#type' => 'fieldset',
-        '#summary callback' => 'uc_summarize_null',
         '#title' => t('!pane settings', array('!pane' => $pane['title'])),
-        '#collapsible' => TRUE,
-        '#collapsed' => TRUE,
+        '#group' => 'pane-settings',
       );
       $form['pane_' . $pane['id']] = array_merge($form['pane_' . $pane['id']], $pane_settings);
     }
@@ -457,102 +451,3 @@ function uc_cart_checkout_panes_form($fo
 
   return system_settings_form($form);
 }
-
-/**
- * Settings for help messages displayed on the checkout page.
- *
- * @ingroup forms
- */
-function uc_cart_checkout_messages_form($form, &$form_state) {
-  $form['uc_checkout_instructions'] = array(
-    '#type' => 'textarea',
-    '#title' => t('Checkout instructions'),
-    '#description' => t('Provide instructions for customers at the top of the checkout screen.'),
-    '#summary' => variable_get('uc_checkout_instructions', '') ? t('Checkout instructions are set.') : t('Checkout instructions are not set.'),
-    '#default_value' => variable_get('uc_checkout_instructions', ''),
-    '#text_format' => variable_get('uc_checkout_instructions_format', filter_default_format()),
-    '#rows' => 3,
-  );
-
-  $form['uc_checkout_review_instructions'] = array(
-    '#type' => 'textarea',
-    '#title' => t('Checkout review instructions'),
-    '#description' => t('Provide instructions for customers at the top of the checkout review screen.'),
-    '#summary' => variable_get('uc_checkout_review_instructions', uc_get_message('review_instructions'))
-               ? t('Review instructions are set.')
-               : t('Review instructions are not set.'),
-    '#default_value' => variable_get('uc_checkout_review_instructions', uc_get_message('review_instructions')),
-    '#text_format' => variable_get('uc_checkout_review_instructions_format', filter_default_format()),
-    '#rows' => 3,
-  );
-
-  $form['uc_msg_order_submit'] = array(
-    '#type' => 'textarea',
-    '#title' => t('Checkout completion message header'),
-    '#description' => t('Header for message displayed after a user checks out. <a href="!url">Uses order, store, and site tokens</a>.', array('!url' => url('admin/store/help/tokens'))),
-    '#summary' => variable_get('uc_msg_order_submit', uc_get_message('completion_message'))
-               ? t('Completion message is set.')
-               : t('Completion message is not set.'),
-    '#default_value' => variable_get('uc_msg_order_submit', uc_get_message('completion_message')),
-    '#text_format' => variable_get('uc_msg_order_submit_format', filter_default_format()),
-    '#rows' => 3,
-  );
-
-  $form['checkout_messages'] = array(
-    '#type' => 'fieldset',
-    '#title' => t('Checkout completion message body'),
-    '#description' => t("In the following three boxes, you may use the special tokens !new_username for the username of a newly created account and !new_password for that account's password."),
-    '#summary callback' => 'uc_summarize_form',
-    '#collapsible' => FALSE,
-  );
-  $form['checkout_messages']['uc_msg_order_logged_in'] = array(
-    '#type' => 'textarea',
-    '#title' => t('Checkout completion for logged-in users'),
-    '#description' => t('Message displayed upon checkout for a user who has logged in. <a href="!url">Uses order, store, and site tokens</a>.', array('!url' => url('admin/store/help/tokens'))),
-    '#summary' => variable_get('uc_msg_order_logged_in', uc_get_message('completion_logged_in'))
-               ? t('Completion text for logged in users is set.')
-               : t('Completion text for logged in users is not set.'),
-    '#default_value' => variable_get('uc_msg_order_logged_in', uc_get_message('completion_logged_in')),
-    '#text_format' => variable_get('uc_msg_order_logged_in_format', filter_default_format()),
-    '#rows' => 3,
-  );
-
-  $form['checkout_messages']['uc_msg_order_existing_user'] = array(
-    '#type' => 'textarea',
-    '#title' => t('Checkout completion for existing users'),
-    '#description' => t("Message displayed upon checkout for a user who has an account but wasn't logged in. <a href=\"!url\">Uses order, store, and site tokens</a>.", array('!url' => url('admin/store/help/tokens'))),
-    '#summary' => variable_get('uc_msg_order_existing_user', uc_get_message('completion_existing_user'))
-               ? t('Completion text for users who aren\'t logged in is set.')
-               : t('Completion text for users who aren\'t logged in is not set.'),
-
-    '#default_value' => variable_get('uc_msg_order_existing_user', uc_get_message('completion_existing_user')),
-    '#text_format' => variable_get('uc_msg_order_existing_user_format', filter_default_format()),
-    '#rows' => 3,
-  );
-
-  $form['checkout_messages']['uc_msg_order_new_user'] = array(
-    '#type' => 'textarea',
-    '#title' => t('Checkout completion for new users'),
-    '#description' => t('Message displayed upon checkout for a new user whose account was just created. <a href="!url">Uses order, store, and site tokens</a>.', array('!url' => url('admin/store/help/tokens'))),
-    '#summary' => variable_get('uc_msg_order_new_user', uc_get_message('completion_new_user'))
-               ? t('Completion text for new users is set.')
-               : t('Completion text for new users is not set.'),
-    '#default_value' => variable_get('uc_msg_order_new_user', uc_get_message('completion_new_user')),
-    '#text_format' => variable_get('uc_msg_order_new_user_format', filter_default_format()),
-    '#rows' => 3,
-  );
-
-  $form['uc_msg_continue_shopping'] = array(
-    '#type' => 'textarea',
-    '#title' => t('Continue shopping message'),
-    '#description' => t('Message displayed upon checkout to direct customers to another part of your site. <a href="!url">Uses order, store, and site tokens</a>.', array('!url' => url('admin/store/help/tokens'))),
-    '#summary' => variable_get('uc_msg_continue_shopping', uc_get_message('continue_shopping'))
-               ? t('Continue shopping text is set.')
-               : t('Continue shopping text is not set.'),
-    '#default_value' => variable_get('uc_msg_continue_shopping', uc_get_message('continue_shopping')),
-    '#text_format' => variable_get('uc_msg_continue_shopping_format', filter_default_format()),
-    '#rows' => 3,
-  );
-
-  return system_settings_form($form);
-}
Index: uc_cart/uc_cart.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/ubercart/uc_cart/uc_cart.install,v
retrieving revision 1.16
diff -u -p -r1.16 uc_cart.install
--- uc_cart/uc_cart.install	16 Feb 2011 03:48:40 -0000	1.16
+++ uc_cart/uc_cart.install	21 Feb 2011 21:24:29 -0000
@@ -87,7 +87,17 @@ function uc_cart_uninstall() {
   variable_del('uc_continue_shopping_type');
   variable_del('uc_use_next_buttons');
   variable_del('uc_collapse_current_pane');
+}
 
-  variable_del('uc_ce_no_cancel');
-  variable_del('uc_ce_submit_disable');
+/**
+ * Remove unused text format variables.
+ */
+function uc_cart_update_7000() {
+  variable_del('uc_checkout_instructions_format');
+  variable_del('uc_checkout_review_instructions_format');
+  variable_del('uc_msg_order_submit_format');
+  variable_del('uc_msg_order_logged_in_format');
+  variable_del('uc_msg_order_existing_user_format');
+  variable_del('uc_msg_order_new_user_format');
+  variable_del('uc_msg_continue_shopping_format');  
 }
Index: uc_cart/uc_cart.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/ubercart/uc_cart/uc_cart.module,v
retrieving revision 1.77
diff -u -p -r1.77 uc_cart.module
--- uc_cart/uc_cart.module	18 Feb 2011 00:02:41 -0000	1.77
+++ uc_cart/uc_cart.module	21 Feb 2011 21:24:30 -0000
@@ -77,63 +77,35 @@ function uc_cart_menu() {
   $items['admin/store/settings/checkout'] = array(
     'title' => 'Checkout settings',
     'description' => 'Configure the checkout settings.',
-    'page callback' => 'uc_cart_checkout_settings_overview',
-    'access arguments' => array('administer store'),
-    'file' => 'uc_cart.admin.inc',
-  );
-  $items['admin/store/settings/checkout/overview'] = array(
-    'title' => 'Overview',
-    'description' => 'View the checkout settings.',
-    'access arguments' => array('administer store'),
-    'type' => MENU_DEFAULT_LOCAL_TASK,
-    'weight' => -10,
-    'file' => 'uc_cart.admin.inc',
-  );
-  $items['admin/store/settings/checkout/edit'] = array(
-    'title' => 'Edit',
-    'description' => 'Edit the cart settings.',
     'page callback' => 'drupal_get_form',
     'page arguments' => array('uc_cart_checkout_settings_form'),
     'access arguments' => array('administer store'),
-    'type' => MENU_LOCAL_TASK,
-    'weight' => -5,
     'file' => 'uc_cart.admin.inc',
   );
-  $items['admin/store/settings/checkout/edit/basic'] = array(
-    'title' => 'Checkout settings',
+  $items['admin/store/settings/checkout/settings'] = array(
+    'title' => 'Settings',
     'description' => 'Edit the basic checkout settings.',
     'access arguments' => array('administer store'),
     'type' => MENU_DEFAULT_LOCAL_TASK,
-    'weight' => -10,
   );
-  $items['admin/store/settings/checkout/edit/panes'] = array(
-    'title' => 'Checkout panes',
+  $items['admin/store/settings/checkout/panes'] = array(
+    'title' => 'Panes',
     'description' => 'Edit the pane settings for the checkout page.',
     'page callback' => 'drupal_get_form',
     'page arguments' => array('uc_cart_checkout_panes_form'),
     'access arguments' => array('administer store'),
     'type' => MENU_LOCAL_TASK,
-    'weight' => -5,
-    'file' => 'uc_cart.admin.inc',
-  );
-  $items['admin/store/settings/checkout/edit/messages'] = array(
-    'title' => 'Checkout messages',
-    'description' => 'Edit the messages for the checkout completion page.',
-    'page callback' => 'drupal_get_form',
-    'page arguments' => array('uc_cart_checkout_messages_form'),
-    'access arguments' => array('administer store'),
-    'type' => MENU_LOCAL_TASK,
-    'weight' => 0,
+    'weight' => 1,
     'file' => 'uc_cart.admin.inc',
   );
-  $items['admin/store/settings/checkout/edit/fields'] = array(
+  $items['admin/store/settings/checkout/fields'] = array(
     'title' => 'Address fields',
     'description' => 'Edit the address field settings.',
     'page callback' => 'drupal_get_form',
     'page arguments' => array('uc_store_address_fields_form'), // missing?
     'access arguments' => array('administer store'),
     'type' => MENU_LOCAL_TASK,
-    'weight' => 5,
+    'weight' => 2,
     'file' => 'uc_cart.admin.inc',
   );
 
@@ -1285,24 +1257,23 @@ function uc_cart_complete_sale($order, $
     }
   }
 
-  $messages['uc_msg_order_submit_format'] = variable_get('uc_msg_order_submit', uc_get_message('completion_message'));
-  $message = variable_get('uc_msg_order_' . $message_type, uc_get_message('completion_' . $message_type));
-  if ($message != '') {
+  $messages = array();
+  $messages[] = variable_get('uc_msg_order_submit', uc_get_message('completion_message'));
+  if ($message = variable_get('uc_msg_order_' . $message_type, uc_get_message('completion_' . $message_type))) {
     if (isset($_SESSION['new_user'])) {
       $variables['!new_username'] = check_plain($_SESSION['new_user']['name']);
       $variables['!new_password'] = check_plain($_SESSION['new_user']['pass']);
-      $messages['uc_msg_order_' . $message_type . '_format'] = strtr($message, $variables);
+      $messages[] = strtr($message, $variables);
     }
     else {
-      $messages['uc_msg_order_' . $message_type . '_format'] = $message;
+      $messages[] = $message;
     }
   }
-  $messages['uc_msg_continue_shopping_format'] = variable_get('uc_msg_continue_shopping', uc_get_message('continue_shopping'));
+  $messages[] = variable_get('uc_msg_continue_shopping', uc_get_message('continue_shopping'));
 
   $output_message = '';
-  foreach ($messages as $format => $message) {
-    $message = token_replace($message, array('uc_order' => $order));
-    $message = check_markup($message, variable_get($format, filter_default_format()));
+  foreach ($messages as $message) {
+    $message = filter_xss_admin(token_replace($message, array('uc_order' => $order)));
     $output_message .= $message;
   }
 
Index: uc_cart/uc_cart.pages.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/ubercart/uc_cart/uc_cart.pages.inc,v
retrieving revision 1.28
diff -u -p -r1.28 uc_cart.pages.inc
--- uc_cart/uc_cart.pages.inc	16 Feb 2011 07:41:04 -0000	1.28
+++ uc_cart/uc_cart.pages.inc	21 Feb 2011 21:24:31 -0000
@@ -244,7 +244,7 @@ function theme_uc_cart_checkout_form($va
 
   drupal_add_css(drupal_get_path('module', 'uc_cart') . '/uc_cart.css');
 
-  $output = '<div id="checkout-instructions">' . check_markup(variable_get('uc_checkout_instructions', ''), variable_get('uc_checkout_instructions_format', filter_default_format())) . '</div>';
+  $output = '<div id="checkout-instructions">' . filter_xss_admin(variable_get('uc_checkout_instructions', '')) . '</div>';
 
   foreach (element_children($form['panes']) as $pane_id) {
     if (function_exists(($func = _uc_checkout_pane_data($pane_id, 'callback')))) {
@@ -417,8 +417,9 @@ function theme_uc_cart_checkout_review($
 
   drupal_add_css(drupal_get_path('module', 'uc_cart') . '/uc_cart.css');
 
-  $output = check_markup(variable_get('uc_checkout_review_instructions', uc_get_message('review_instructions')), variable_get('uc_checkout_review_instructions_format', filter_default_format()))
-           . '<table class="order-review-table">';
+  $output = '<div id="review-instructions">' . filter_xss_admin(variable_get('uc_checkout_review_instructions', uc_get_message('review_instructions'))) . '</div>';
+
+  $output .= '<table class="order-review-table">';
 
   foreach ($panes as $title => $data) {
     $output .= '<tr class="pane-title-row"><td colspan="2">' . $title
