You are here

function theme_discussthis_admin in Discuss This! 5

Render the admin settings page so that the required default Form dropdowns are immediately beside the checkboxes

File

./discussthis.module, line 461

Code

function theme_discussthis_admin($form) {
  $types = '<ul>';
  foreach ($form['discussthis_nodetypes']['#options'] as $type => $name) {
    $types .= '<li>';
    $types .= drupal_render($form['discussthis_nodetypes'][$type]);
    $types .= '<span class="conditional-select">';
    $types .= drupal_render($form['defaults']['discussthis_node_' . $type]);
    $types .= drupal_render($form['defaults']['discussthis_teaser_' . $type]);
    $types .= '</span>';
    $types .= '</li>';
  }
  $types .= '</ul>';
  $output .= drupal_render($form['discussthis_nodetypes']);
  $output .= $types;
  $output .= drupal_render($form['discussthis_comments']);
  $output .= drupal_render($form['discussthis_newsubject']);
  $output .= drupal_render($form['discussthis_newtemplate']);
  $output .= drupal_render($form);
  return $output;
}