You are here

function theme_uc_extra_fields_pane_order_pane in Extra Fields Checkout Pane 6.2

Theme the extra fields forms on the order edit page.

Parameters

array $form:

Return value

string

1 theme call to theme_uc_extra_fields_pane_order_pane()
UCXF_Pane::order_edit_theme in class/UCXF_Pane.class.php
Theme the editable form @access protected

File

includes/theme.inc, line 46
Theme functions for the panes

Code

function theme_uc_extra_fields_pane_order_pane($form) {
  $output = '';
  if (count(element_children($form)) > 0) {
    $output .= '<table class="order-edit-table">';
    foreach (element_children($form) as $key => $field) {
      $title = $form[$field]['#title'];
      unset($form[$field]['#title']);
      unset($form[$field]['#description']);
      if (!empty($title)) {

        // Add colon only if title is not empty
        $title .= ':';
      }
      $output .= '<tr><td class="oet-label">' . $title . '</td><td>' . drupal_render($form[$field]) . '</td></tr>';
    }
    $output .= '</table>';
  }
  return $output;
}