You are here

function theme_uc_quote_method_settings in Ubercart 5

Same name and namespace in other branches
  1. 6.2 shipping/uc_quote/uc_quote.admin.inc \theme_uc_quote_method_settings()
  2. 7.3 shipping/uc_quote/uc_quote.admin.inc \theme_uc_quote_method_settings()

Display a formatted list of shipping quote methods and form elements.

See also

uc_quote_method_settings

File

shipping/uc_quote/uc_quote.module, line 813
The controller module for fulfillment modules that process physical goods.

Code

function theme_uc_quote_method_settings($form) {
  $methods = uc_quote_shipping_method_options();
  $output = '';
  $header = array(
    t('Enable'),
    t('Shipping method'),
    t('Weight'),
  );
  $rows = array();
  foreach (element_children($form['methods']) as $method) {
    $row = array();
    $row[] = drupal_render($form['methods'][$method]['uc_quote_enabled']);
    $row[] = $methods[$method];
    $row[] = drupal_render($form['methods'][$method]['uc_quote_method_weight']);
    $rows[] = $row;
  }
  $output .= theme('table', $header, $rows);
  $output .= drupal_render($form);
  return $output;
}