function theme_uc_stock_edit_form in Ubercart 5
Same name and namespace in other branches
- 6.2 uc_stock/uc_stock.admin.inc \theme_uc_stock_edit_form()
- 7.3 uc_stock/uc_stock.admin.inc \theme_uc_stock_edit_form()
File
- uc_stock/
uc_stock.module, line 184
Code
function theme_uc_stock_edit_form($form) {
$header = array(
array(
'data' => t('Active'),
),
array(
'data' => t('SKU'),
),
array(
'data' => t('Stock'),
),
array(
'data' => t('Threshold'),
),
);
foreach (element_children($form['stock']) as $id) {
$rows[] = array(
array(
'data' => drupal_render($form['stock'][$id]['active']),
),
array(
'data' => drupal_render($form['stock'][$id]['display_sku']),
),
array(
'data' => drupal_render($form['stock'][$id]['stock']),
),
array(
'data' => drupal_render($form['stock'][$id]['threshold']),
),
);
}
return theme('table', $header, $rows) . drupal_render($form);
}