'center', 'data' => '
'. t('Country') .''), array('align' => 'center', 'data' => ''. t('Options') .''));
$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_map_link_'. $country_iso])
);
$rows[] = $row;
}
$output = theme('table', $header, $rows);
foreach (element_children($form) as $key) {
$output .= drupal_render($form[$key]);
}
$output .= drupal_render($form);
return $output;
}
function theme_location_geocoding_options(&$form) {
$header = array(
array('align' => 'center', 'data' => ''. t('Country') .''),
array('align' => 'center', 'data' => ''. t('Options') .''),
array('align' => 'center', 'data' => ''. t('Configure') .'')
);
$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', $header, $rows);
foreach (element_children($form) as $key) {
$output .= drupal_render($form[$key]);
}
$output .= drupal_render($form);
return $output;
}
/**
* Generates HTML for the ALL passed locations.
*
* @param $location
* Array. A series of locations with the following fields:
* 'street' => A string representing the street location
* 'additional' => A string for any additional portion of the street location
* 'city' => A string for the city name
* 'province' => The standard postal abbreviation for the province
* 'country' => The two-letter ISO code for the country of the location (REQUIRED)
* 'postal_code' => The international postal code for the location
* @param $hide
* Array. The values are the location fields to suppress in the themed display.
* @ingroup themeable
*/
function theme_locations($locations = array(), $hide = array()) {
$output = '';
if (count($locations)) {
$output .= ''. (count($locations) > 1 ? t('Locations') : t('Location')) .'
';
foreach ($locations as $location) {
$output .= theme('location', $location, $hide);
}
}
return $output;
}