You are here

function theme_uc_cart_checkout_form in Ubercart 6.2

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

Adds markup and styling to the checkout panes.

See also

uc_cart_checkout_form()

File

uc_cart/uc_cart.pages.inc, line 248
Cart menu items.

Code

function theme_uc_cart_checkout_form($form) {
  drupal_add_css(drupal_get_path('module', 'uc_cart') . '/uc_cart.css');
  $output = '<div id="checkout-instructions">' . check_markup(variable_get('uc_checkout_instructions', ''), variable_get('uc_checkout_instructions_format', FILTER_FORMAT_DEFAULT), 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;
}