You are here

function theme_location_geocoding_options in Location 7.5

Same name and namespace in other branches
  1. 5.3 location.admin.inc \theme_location_geocoding_options()
  2. 5 location.theme \theme_location_geocoding_options()
  3. 6.3 location.admin.inc \theme_location_geocoding_options()
  4. 7.3 location.admin.inc \theme_location_geocoding_options()
  5. 7.4 location.admin.inc \theme_location_geocoding_options()

File

./location.admin.inc, line 314
Admin forms for Location.

Code

function theme_location_geocoding_options($variables) {
  $form = $variables['form'];
  $output = drupal_render($form['location_geocode_google_minimum_accuracy']);
  $header = array(
    array(
      'align' => 'center',
      'data' => '<center>' . t('Country') . '</center>',
    ),
    array(
      'align' => 'center',
      'data' => '<center>' . t('Options') . '</center>',
    ),
    array(
      'align' => 'center',
      'data' => '<center>' . t('Configure') . '</center>',
    ),
  );
  $rows = array();
  foreach (element_children($form['countries']) as $country_iso) {
    $row = array();
    $row[] = array(
      'data' => drupal_render($form['countries'][$country_iso]['label_' . $country_iso]),
    );
    $row[] = array(
      'data' => drupal_render($form['countries'][$country_iso]['location_geocode_' . $country_iso]),
    );
    $row[] = array(
      'data' => drupal_render($form['countries'][$country_iso]['location_geocode_config_link_' . $country_iso]),
    );
    $rows[] = $row;
  }
  $output .= theme('table', array(
    'header' => $header,
    'rows' => $rows,
  ));
  $output .= drupal_render_children($form);
  return $output;
}