function theme_uc_recurring_subscription_item in UC Recurring Payments and Subscriptions 6.2
Same name and namespace in other branches
- 7.2 modules/uc_recurring_subscription/uc_recurring_subscription.admin.inc \theme_uc_recurring_subscription_item()
File
- modules/
uc_recurring_subscription/ uc_recurring_subscription.admin.inc, line 785 - Uc recurring subscription UI.
Code
function theme_uc_recurring_subscription_item($form) {
$header = array(
t('Default'),
t('Subscription Interval'),
t('Amount'),
t('Billing Intervals'),
t('Order'),
'',
);
drupal_add_tabledrag('recurring-subscription', 'order', 'sibling', 'recurring-weight');
foreach (element_children($form) as $key) {
if ($key === 'default_payment') {
continue;
}
// Add class to group weight fields for drag and drop.
$form[$key]['weight']['#attributes']['class'] = 'recurring-weight';
$row = array();
$row[] = drupal_render($form['default_payment'][$key]);
$row[] = drupal_render($form[$key]['interval_value']) . drupal_render($form[$key]['interval_unit']);
$row[] = drupal_render($form[$key]['amount']);
$row[] = drupal_render($form[$key]['number_intervals']) . drupal_render($form[$key]['unlimited']);
$row[] = drupal_render($form[$key]['weight']);
$row[] = drupal_render($form[$key]['operations']) . drupal_render($form[$key]['pfid']);
$rows[] = array(
'data' => $row,
'class' => 'draggable tabledrag-leaf',
);
}
$output = theme('table', $header, $rows, array(
'id' => 'recurring-subscription',
));
//$output .= drupal_render($form);
return $output;
}