? .git
? .gitignore
Index: payment/uc_payment/uc_payment.admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/ubercart/payment/uc_payment/uc_payment.admin.inc,v
retrieving revision 1.19
diff -u -p -r1.19 uc_payment.admin.inc
--- payment/uc_payment/uc_payment.admin.inc	16 Feb 2011 20:50:56 -0000	1.19
+++ payment/uc_payment/uc_payment.admin.inc	21 Feb 2011 21:39:26 -0000
@@ -7,47 +7,18 @@
  *
  */
 
-
 /**
- * Displays an overview of the payment settings.
+ * Basic payment settings form.
  */
-function uc_payment_settings_overview() {
-  // Theme all the pages beneath this path into summary overviews.
-  return array(
-    '#theme' => 'uc_summary_overview',
-    '#summaries' => uc_summarize_child_form_pages('admin/store/settings/payment/edit'),
-  );
-}
-
 function uc_payment_settings_form($form, &$form_state) {
   $form['uc_payment_tracking'] = array(
     '#type' => 'checkbox',
     '#title' => t('Enable payment tracking.'),
-    '#summary callback' => 'uc_summarize_checkbox',
-    '#summary arguments' => array(
-      t('Payment tracking is enabled.'),
-      t('Payment tracking is disabled.'),
-    ),
     '#default_value' => variable_get('uc_payment_tracking', TRUE),
   );
-  $form['uc_payment_deleting'] = array(
-    '#type' => 'checkbox',
-    '#title' => t('Allow payments to be deleted by users with permission.'),
-    '#summary callback' => 'uc_summarize_checkbox',
-    '#summary arguments' => array(
-      t('Payments can be deleted by users with permission.'),
-      t('Payments cannot be deleted, even if the user has permission.'),
-    ),
-    '#default_value' => variable_get('uc_payment_deleting', TRUE),
-  );
   $form['uc_payment_logging'] = array(
     '#type' => 'checkbox',
     '#title' => t('Log payments entered and deleted to order log.'),
-    '#summary callback' => 'uc_summarize_checkbox',
-    '#summary arguments' => array(
-      t('Log payments are being entered to and deleted from the order log.'),
-      t('Log payments are not being entered to and deleted from the order log.'),
-    ),
     '#default_value' => variable_get('uc_payment_logging', TRUE),
   );
 
@@ -56,7 +27,6 @@ function uc_payment_settings_form($form,
     '#title' => t('Default payment details message'),
     '#description' => t('Message displayed when a payment method does not display any further details.'),
     '#default_value' => variable_get('uc_default_payment_msg', t('Continue with checkout to complete payment.')),
-    '#summary' => t('Default payment details message is: <br /> %message', array('%message' => variable_get('uc_default_payment_msg', t('Continue with checkout to complete payment.')))),
   );
 
   return system_settings_form($form);
@@ -65,28 +35,13 @@ function uc_payment_settings_form($form,
 function uc_payment_methods_form($form, &$form_state) {
   $methods = _uc_payment_method_list();
 
-  $form['methods_info'] = array(
-    '#markup' => '<div><strong>' . t('Payment methods') . '</strong><br />'
-              . t('The settings forms below are for the payment methods defined by enabled modules. Click a name to expand its options and adjust the settings accordingly. Methods are listed in order of appearance on the checkout screen, determined by the list position setting (current value shown in parentheses).') . '</div><br />',
-  );
-
-  $form['pmtable'] = array(
-    '#theme' => 'uc_payment_method_table',
-    '#summary callback' => 'uc_summarize_form',
-  );
+  $form['pmtable'] = array('#theme' => 'uc_payment_method_table');
+  $form['method-settings'] = array('#type' => 'vertical_tabs');
 
   if (is_array($methods) && count($methods) > 0) {
     foreach ($methods as $method) {
-
-      $form['pmtable'][$method['id']]['#summary callback'] = 'uc_summarize_form';
-
       $form['pmtable'][$method['id']]['uc_payment_method_' . $method['id'] . '_checkout'] = array(
         '#type' => 'checkbox',
-        '#summary callback' => 'uc_summarize_checkbox',
-        '#summary arguments' => array(
-          t('@payment is enabled for checkout.', array('@payment' => $method['name'])),
-          t('@payment is disabled for checkout.', array('@payment' => $method['name'])),
-        ),
         '#default_value' => variable_get('uc_payment_method_' . $method['id'] . '_checkout', $method['checkout']),
       );
       $form['pmtable'][$method['id']]['name'] = array(
@@ -120,7 +75,6 @@ function uc_payment_methods_form($form, 
         $form['pmtable'][$method['id']]['uc_payment_' . $method['id'] . '_gateway'] = array(
           '#type' => 'select',
           '#options' => $options,
-          '#summary callback' => 'uc_summarize_null',
           '#default_value' => variable_get('uc_payment_' . $method['id'] . '_gateway', 'none'),
         );
       }
@@ -130,10 +84,8 @@ function uc_payment_methods_form($form, 
       if (is_array($method_settings)) {
         $form['method_' . $method['id']] = array(
           '#type' => 'fieldset',
-          '#summary callback' => 'uc_summarize_null',
           '#title' => t('!method settings', array('!method' => $method['name'], '!weight' => $method['weight'])),
-          '#collapsible' => TRUE,
-          '#collapsed' => TRUE,
+          '#group' => 'method-settings',
         );
         $form['method_' . $method['id']] = array_merge($form['method_' . $method['id']], $method_settings);
       }
@@ -173,24 +125,14 @@ function uc_payment_gateways_form($form,
   $gateways = _uc_payment_gateway_list();
   $methods = _uc_payment_method_list();
 
-  $form['gateways'] = array(
-    '#summary callback' => '_uc_payment_gateways_summarize',
-    '#summary arguments' => array($gateways),
-  );
-
   if (is_array($gateways) && count($gateways) > 0) {
-    $form['gateways_info'] = array(
-      '#markup' => '<div><strong>' . t('Payment gateways') . '</strong><br />'
-                . t('Payment gateways are web services that allow you to process various types of payments remotely.  The settings forms below are for the payment gateways you have installed.  Click a name to expand its options and adjust the settings accordingly.') . '</div>',
-      '#weight' => -10,
-    );
-
+    $form['gateway-settings'] = array('#type' => 'vertical_tabs');
+    
     foreach ($gateways as $gateway) {
       $form['gateways'][$gateway['id']] = array(
         '#type' => 'fieldset',
         '#title' => t('@gateway_name settings', array('@gateway_name' => $gateway['title'])),
-        '#collapsible' => TRUE,
-        '#collapsed' => TRUE,
+        '#group' => 'gateway-settings',
       );
       $supported_methods = array();
       foreach ($methods as $method) {
@@ -231,23 +173,6 @@ function uc_payment_gateways_form($form,
 }
 
 /**
- * Returns an array of enabled payment gateways for the form summary.
- */
-function _uc_payment_gateways_summarize($form, $gateways) {
-  $items = array();
-
-  foreach ($gateways as $gateway) {
-    $items[] = t('@title is @enabled.', array('@title' => $gateway['title'], '@enabled' => $gateway['enabled'] ? t('enabled') : t('disabled')));
-  }
-
-  if (empty($items)) {
-    $items[] = t('No payment gateway modules are installed.');
-  }
-
-  return $items;
-}
-
-/**
  * Selects a payment gateway to process a payment when multiple gateways
  * exist for a given payment method.
  */
@@ -350,7 +275,7 @@ function uc_payment_by_order_form($form,
       $form['payments'][$payment->receipt_id]['comment'] = array(
         '#markup' => ($payment->comment == '') ? '-' : filter_xss_admin($payment->comment),
       );
-      if (variable_get('uc_payment_deleting', TRUE) && user_access('delete payments')) {
+      if (user_access('delete payments')) {
         $action_value = l(t('Delete'), 'admin/store/orders/' . $order->order_id . '/payments/'
                           . $payment->receipt_id . '/delete');
       }
Index: payment/uc_payment/uc_payment.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/ubercart/payment/uc_payment/uc_payment.module,v
retrieving revision 1.33
diff -u -p -r1.33 uc_payment.module
--- payment/uc_payment/uc_payment.module	17 Feb 2011 09:36:45 -0000	1.33
+++ payment/uc_payment/uc_payment.module	21 Feb 2011 21:39:26 -0000
@@ -25,53 +25,36 @@ require_once('uc_payment_order_pane.inc'
  */
 function uc_payment_menu() {
   $items['admin/store/settings/payment'] = array(
-    'title' => 'Payment settings',
+    'title' => 'Payment methods and settings',
     'description' => 'Configure the payment settings.',
-    'page callback' => 'uc_payment_settings_overview',
+    'page callback' => 'drupal_get_form',
+    'page arguments' => array('uc_payment_methods_form'),
     'access arguments' => array('administer store'),
     'file' => 'uc_payment.admin.inc',
   );
-  $items['admin/store/settings/payment/overview'] = array(
-    'title' => 'Overview',
-    'description' => 'View the payment settings.',
+  $items['admin/store/settings/payment/methods'] = array(
+    'title' => 'Methods',
+    'description' => 'Edit the payment method settings.',
     'access arguments' => array('administer store'),
-    'weight' => -10,
     'type' => MENU_DEFAULT_LOCAL_TASK,
   );
-  $items['admin/store/settings/payment/edit'] = array(
-    'title' => 'Edit',
-    'description' => 'Edit the payment settings.',
-    'page callback' => 'drupal_get_form',
-    'page arguments' => array('uc_payment_settings_form'),
+  $items['admin/store/settings/payment/gateways'] = array(
+    'title' => 'Gateways',
+    'description' => 'Edit the payment gateway settings.',
     'access arguments' => array('administer store'),
-    'weight' => -5,
+    'page callback' => 'drupal_get_form',
+    'page arguments' => array('uc_payment_gateways_form'),
+    'weight' => 2,
     'type' => MENU_LOCAL_TASK,
     'file' => 'uc_payment.admin.inc',
   );
-  $items['admin/store/settings/payment/edit/basic'] = array(
-    'title' => 'Payment settings',
+  $items['admin/store/settings/payment/settings'] = array(
+    'title' => 'Settings',
     'description' => 'Edit the basic payment settings.',
-    'access arguments' => array('administer store'),
-    'weight' => -10,
-    'type' => MENU_DEFAULT_LOCAL_TASK,
-  );
-  $items['admin/store/settings/payment/edit/methods'] = array(
-    'title' => 'Payment methods',
-    'description' => 'Edit the payment method settings.',
     'page callback' => 'drupal_get_form',
-    'page arguments' => array('uc_payment_methods_form'),
-    'access arguments' => array('administer store'),
-    'weight' => -5,
-    'type' => MENU_LOCAL_TASK,
-    'file' => 'uc_payment.admin.inc',
-  );
-  $items['admin/store/settings/payment/edit/gateways'] = array(
-    'title' => 'Payment gateways',
-    'description' => 'Edit the payment gateway settings.',
+    'page arguments' => array('uc_payment_settings_form'),
     'access arguments' => array('administer store'),
-    'page callback' => 'drupal_get_form',
-    'page arguments' => array('uc_payment_gateways_form'),
-    'weight' => 0,
+    'weight' => 10,
     'type' => MENU_LOCAL_TASK,
     'file' => 'uc_payment.admin.inc',
   );
@@ -106,7 +89,7 @@ function uc_payment_menu() {
     'description' => 'Delete payment?',
     'page callback' => 'drupal_get_form',
     'page arguments' => array('uc_payment_delete_confirm_form', 3, 5),
-    'access callback' => 'uc_payment_delete_access',
+    'access arguments' => array('delete payments'),
     'type' => MENU_CALLBACK,
     'file' => 'uc_payment.admin.inc',
   );
@@ -140,13 +123,6 @@ function uc_payment_tracking_access() {
 }
 
 /**
- * Access callback to delete a payment.
- */
-function uc_payment_delete_access() {
-  return user_access('delete payments') && variable_get('uc_payment_deleting', TRUE);
-}
-
-/**
  * Implements hook_theme().
  */
 function uc_payment_theme() {
