You are here

function theme_dfp_adsense_color_settings in Doubleclick for Publishers (DFP) 7.2

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

Theme function for the "target" form.

1 theme call to theme_dfp_adsense_color_settings()
dfp_tag_form in plugins/export_ui/dfp_ctools_export_ui.inc
Form builder; Create an ad tag.

File

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

Code

function theme_dfp_adsense_color_settings($variables) {
  $form = $variables['form'];
  $caption = t('AdSense Color Settings');
  $header = array(
    t('Color Setting'),
    t('Hex color value'),
    t('Sample'),
  );
  $rows = array();
  foreach (element_children($form) as $key) {
    $rows[] = array(
      $form[$key]['#title'],
      drupal_render($form[$key]),
      "<div class='color-sample' style='background-color: #" . $form[$key]['#default_value'] . ";'>&nbsp;</div>",
    );
  }
  $output = '  <label>' . t('Color Settings for Text Ads') . '</label>';
  $output .= theme('table', array(
    'attributes' => array(
      'id' => 'color-settings',
    ),
    'header' => $header,
    'rows' => $rows,
  ));
  return $output;
}