Skip navigation
Help

theme_uc_shipping_edit_package_fieldset

6 uc_shipping.admin.inc theme_uc_shipping_edit_package_fieldset($fieldset)
7 uc_shipping.admin.inc theme_uc_shipping_edit_package_fieldset($variables)

Displays a formatted shipping type fieldset.

Related topics

File

ubercart/shipping/uc_shipping/uc_shipping.admin.inc, line 374
Shipping administration menu items.

Code

function theme_uc_shipping_edit_package_fieldset($variables) {
  $fieldset = $variables['fieldset'];
  drupal_add_js('misc/tableselect.js');

  $output = '';
  $header = array(array('class' => array('select-all')), t('SKU'), t('Title'), theme('uc_qty_label'));
  $rows = array();
  foreach (element_children($fieldset) as $op_id) {
    $row = array();
    $row[] = drupal_render($fieldset[$op_id]['checked']);
    $row[] = drupal_render($fieldset[$op_id]['model']);
    $row[] = drupal_render($fieldset[$op_id]['name']);
    $row[] = drupal_render($fieldset[$op_id]['qty']);
    $rows[] = $row;
  }
  $output .= theme('table', array('header' => $header, 'rows' => $rows));
  $output .= drupal_render_children($fieldset);

  return $output;
}