You are here

function theme_uc_cart_checkout_form in Ubercart 5

Same name and namespace in other branches
  1. 6.2 uc_cart/uc_cart.pages.inc \theme_uc_cart_checkout_form()
  2. 7.3 uc_cart/uc_cart.pages.inc \theme_uc_cart_checkout_form()

File

uc_cart/uc_cart.module, line 1480

Code

function theme_uc_cart_checkout_form($form) {
  drupal_add_css(drupal_get_path('module', 'uc_cart') . '/uc_cart.css');
  $output = '<div>' . check_markup(variable_get('uc_checkout_instructions', ''), variable_get('uc_checkout_instructions_format', 3), FALSE) . '</div>';
  foreach (element_children($form['panes']) as $pane_id) {
    if (function_exists($func = _checkout_pane_data($pane_id, 'callback'))) {
      $result = $func('theme', $form['panes'][$pane_id], NULL);
      if (!empty($result)) {
        $output .= $result;
        $form['panes'][$pane_id] = array();
      }
      else {
        $output .= drupal_render($form['panes'][$pane_id]);
      }
    }
    else {
      $output .= drupal_render($form['panes'][$pane_id]);
    }
  }
  $output .= '<div id="checkout-form-bottom">' . drupal_render($form) . '</div>';
  return $output;
}