You are here

function theme_dfp_target_settings in Doubleclick for Publishers (DFP) 7

Same name and namespace in other branches
  1. 7.2 dfp.admin.inc \theme_dfp_target_settings()

Theme function for the "target" form.

1 theme call to theme_dfp_target_settings()
_dfp_targeting_form in ./dfp.admin.inc
Helper form builder for the targeting form.

File

./dfp.admin.inc, line 670
Admin forms and functinality for DFP ads.

Code

function theme_dfp_target_settings($variables) {
  $form = $variables['form'];
  $more_button = drupal_render($form['dfp_more_targets']);
  unset($form['dfp_more_targets']);
  $headers = array(
    t('Target'),
    t('Value(s)'),
  );
  $rows = array();
  foreach (element_children($form) as $key) {
    $rows[] = array(
      drupal_render($form[$key]['target']),
      drupal_render($form[$key]['value']),
    );
  }
  return theme('table', array(
    'header' => $headers,
    'rows' => $rows,
  )) . $more_button;
}