function theme_uc_shipping_new_shipment in Ubercart 6.2
Same name and namespace in other branches
- 5 shipping/uc_shipping/uc_shipping.module \theme_uc_shipping_new_shipment()
- 7.3 shipping/uc_shipping/uc_shipping.admin.inc \theme_uc_shipping_new_shipment()
Formats and displays the new shipment form.
See also
File
- shipping/
uc_shipping/ uc_shipping.admin.inc, line 553 - Shipping administration menu items.
Code
function theme_uc_shipping_new_shipment($form) {
$output = '';
$header = array(
theme('table_select_header_cell'),
t('Package'),
t('Products'),
t('Weight'),
);
foreach (element_children($form['shipping_types']) as $shipping_type) {
$rows = array();
foreach (element_children($form['shipping_types'][$shipping_type]['packages']) as $package_id) {
$row = array();
$row[] = drupal_render($form['shipping_types'][$shipping_type]['packages'][$package_id]['checked']);
$row[] = drupal_render($form['shipping_types'][$shipping_type]['packages'][$package_id]['package_id']);
$row[] = drupal_render($form['shipping_types'][$shipping_type]['packages'][$package_id]['products']);
$row[] = drupal_render($form['shipping_types'][$shipping_type]['packages'][$package_id]['weight']);
$rows[] = $row;
}
if (count($rows)) {
$form['shipping_types'][$shipping_type]['packages']['table'] = array(
'#value' => theme('table', $header, $rows),
);
}
}
$output .= drupal_render($form);
return $output;
}