You are here

function theme_uc_quote_method_settings in Ubercart 6.2

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

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

See also

uc_quote_method_settings()

File

shipping/uc_quote/uc_quote.admin.inc, line 238
Shipping quotes administration menu items.

Code

function theme_uc_quote_method_settings($form) {
  drupal_add_tabledrag('uc-quote-methods', 'order', 'sibling', 'uc-quote-method-weight');
  $header = array(
    t('Shipping method'),
    t('List position'),
  );
  $rows = array();
  foreach (element_children($form['methods']) as $method) {
    $row = array(
      drupal_render($form['methods'][$method]['uc_quote_enabled']),
      drupal_render($form['methods'][$method]['uc_quote_method_weight']),
    );
    $rows[] = array(
      'data' => $row,
      'class' => 'draggable',
    );
  }
  $output = theme('table', $header, $rows, array(
    'id' => 'uc-quote-methods',
  ));
  $output .= drupal_render($form);
  return $output;
}