You are here

function theme_dfp_size_settings in Doubleclick for Publishers (DFP) 7.2

Same name and namespace in other branches
  1. 7 dfp.admin.inc \theme_dfp_size_settings()

Theme function for the "size" context reaction form.

1 theme call to theme_dfp_size_settings()
dfp_context_reaction_sizes::options_form in plugins/contexts/dfp_context_reaction_sizes.inc
Allow admins to choose what DFP adunit to override.

File

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

Code

function theme_dfp_size_settings($variables) {
  $form = $variables['form'];
  $headers = array(
    t('Ad Slot'),
    t('Size Override'),
  );
  $rows = array();
  $caption = t('You can override the size(s) of the ad slot for this context by entering the new size(s) below. Leave the field blank if the size should not be overridden.');
  $children = element_children($form);
  $last = array_pop($children);
  foreach (element_children($form) as $key) {
    if ($key != $last) {
      unset($form[$key]['#description']);
    }
    $rows[] = array(
      $form[$key]['#title'],
      drupal_render($form[$key]),
    );
  }
  return theme('table', array(
    'header' => $headers,
    'rows' => $rows,
    'caption' => $caption,
  ));
}