function theme_uc_pma_payment_method_table in Ubercart Payment Method Adjustments 6
Same name and namespace in other branches
- 7 uc_pma.module \theme_uc_pma_payment_method_table()
File
- ./
uc_pma.module, line 111 - This module hooks into a few different parts of Ubercart to allow store administrators to associate a fee or discount with payment methods.
Code
function theme_uc_pma_payment_method_table($form) {
$header = array(
t('Enabled'),
t('Payment method'),
t('Weight'),
t('Adjustment'),
t('Default gateway'),
);
foreach (element_children($form) as $method) {
$rows[] = array(
array(
'data' => drupal_render($form[$method]['uc_payment_method_' . $method . '_checkout']),
'align' => 'center',
),
drupal_render($form[$method]['name']),
drupal_render($form[$method]['uc_payment_method_' . $method . '_weight']),
drupal_render($form[$method]['uc_payment_method_' . $method . '_adjustment']),
drupal_render($form[$method]['uc_payment_' . $method . '_gateway']),
);
}
if (empty($rows)) {
$rows[] = array(
array(
'data' => t('No payment methods found.'),
'colspan' => 5,
),
);
}
return theme('table', $header, $rows);
}