You are here

function theme_signup_node_admin_summary_form in Signup 7

Same name and namespace in other branches
  1. 5.2 signup.module \theme_signup_node_admin_summary_form()
  2. 6.2 theme/node.admin.inc \theme_signup_node_admin_summary_form()
  3. 6 theme/node.admin.inc \theme_signup_node_admin_summary_form()

Renders the HTML for the per-node signup summary administrative form.

File

theme/node.admin.inc, line 45
Theme functions for the signup node administration page (node/N/signups).

Code

function theme_signup_node_admin_summary_form($variables) {
  $form = $variables['form'];
  $output = '';
  $output .= '<div class="container-inline">' . drupal_render($form['status']);
  if (!empty($form['submit']) && $form['status']['#type'] == 'select') {
    $output .= ' ' . drupal_render($form['submit']);
  }
  $output .= '</div>';
  foreach (element_children($form) as $key) {
    if (!in_array($key, array(
      'status',
      'submit',
      'nid',
      'form_build_id',
      'form_token',
      'form_id',
    ))) {
      $prefix = '<div class="container-inline">';
      $suffix = '</div>';
      if (empty($form[$key]['#prefix'])) {
        $form[$key]['#prefix'] = $prefix;
      }
      else {
        $form[$key]['#prefix'] .= $prefix;
      }
      if (empty($form[$key]['#suffix'])) {
        $form[$key]['#suffix'] = $suffix;
      }
      else {
        $form[$key]['#suffix'] .= $suffix;
      }
    }
  }
  $output .= drupal_render_children($form);
  $fieldset = array(
    '#title' => t('Signup summary'),
    '#collapsible' => TRUE,
    '#collapsed' => FALSE,
    '#attributes' => array(),
    '#children' => '',
    '#value' => $output,
  );
  return theme('fieldset', array(
    'element' => $fieldset,
  ));
}