You are here

function theme_uc_shipping_edit_package_fieldset in Ubercart 7.3

Same name and namespace in other branches
  1. 5 shipping/uc_shipping/uc_shipping.module \theme_uc_shipping_edit_package_fieldset()
  2. 6.2 shipping/uc_shipping/uc_shipping.admin.inc \theme_uc_shipping_edit_package_fieldset()

Displays a formatted shipping type fieldset.

File

shipping/uc_shipping/uc_shipping.admin.inc, line 376
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;
}