You are here

function theme_uc_order_edit_form in Ubercart 5

Same name and namespace in other branches
  1. 6.2 uc_order/uc_order.admin.inc \theme_uc_order_edit_form()
  2. 7.3 uc_order/uc_order.admin.inc \theme_uc_order_edit_form()

File

uc_order/uc_order.module, line 1647

Code

function theme_uc_order_edit_form($form) {
  $panes = _order_pane_list();
  foreach ($panes as $pane) {
    if (in_array('edit', $pane['show']) && variable_get('uc_order_pane_' . $pane['id'] . '_show_edit', TRUE)) {
      $func = $pane['callback'];
      if (function_exists($func) && ($contents = _call_order_pane_byref($func, 'edit-theme', $form)) != NULL) {
        if (is_array($pane['theme_all']) && in_array('edit', $pane['theme_all'])) {
          $output .= $contents;
        }
        else {
          $output .= '<div class="order-pane ' . $pane['class'] . '">';
          if ($func('show-title', NULL) !== FALSE) {
            $output .= '<div class="order-pane-title">' . $pane['title'] . ': ' . $func('edit-title', $form) . '</div>';
          }
          $output .= $contents . '</div>';
        }
      }
    }
  }
  $output .= '<div class="order-pane abs-left">' . drupal_render($form['order_id']) . drupal_render($form['form_id']) . drupal_render($form['form_token']) . drupal_render($form['submit-changes']) . drupal_render($form['delete']) . '</div>';
  return $output;
}