function getlocations_fields_display_settings_form in Get Locations 7
Same name and namespace in other branches
- 7.2 modules/getlocations_fields/getlocations_fields.module \getlocations_fields_display_settings_form()
display settings form for sharing
Parameters
array $defaults: Settings
Return value
array $form
2 calls to getlocations_fields_display_settings_form()
- getlocations_fields_field_formatter_settings_form in modules/
getlocations_fields/ getlocations_fields.module - Implements hook_field_formatter_settings_form(). Returns form elements for a formatter's settings.
- getlocations_fields_settings_form in modules/
getlocations_fields/ getlocations_fields.admin.inc - Function to display the getlocations admin settings form
File
- modules/
getlocations_fields/ getlocations_fields.module, line 3706 - getlocations_fields.module @author Bob Hutchinson http://drupal.org/user/52366 @copyright GNU GPL
Code
function getlocations_fields_display_settings_form($defaults) {
$form = array();
// display defaults
$form['display_showmap'] = getlocations_element_map_checkbox(t('Show map in display'), $defaults['display_showmap'], '');
$form['display_maplink'] = getlocations_element_map_checkbox(t('Show link to map in display'), $defaults['display_maplink'], t('Only applicable when the map is not being displayed.'));
$form['display_mapwidth'] = getlocations_element_map_tf(t('Map width'), $defaults['display_mapwidth'], t('The width of a map, as a CSS length or percentage. Examples: <em>50px</em>, <em>5em</em>, <em>2.5in</em>, <em>95%</em>'), 10, 10, TRUE);
$form['display_mapheight'] = getlocations_element_map_tf(t('Map height'), $defaults['display_mapheight'], t('The height of a map, as a CSS length or percentage. Examples: <em>50px</em>, <em>5em</em>, <em>2.5in</em>, <em>95%</em>'), 10, 10, TRUE);
$form['display_latlong'] = getlocations_element_map_checkbox(t('Show Latitude/Longitude in display'), $defaults['display_latlong'], '');
$form['display_dms'] = getlocations_element_map_checkbox(t('Show Latitude/Longitude in Degrees, minutes, seconds'), $defaults['display_dms'], '');
$form['display_geo_microformat'] = getlocations_element_dd(t('Show Latitude/Longitude in accordance with Geo Microformat or Microdata markup'), $defaults['display_geo_microformat'], array(
0 => t('None'),
1 => t('Microformat'),
2 => t('Microdata'),
), t('See the <a href="@a" target="_blank">Microformats wiki</a> or <a href="@b" target="_blank">Microdata standards</a> for more information', array(
'@a' => url('http://microformats.org/wiki/geo'),
'@b' => url('http://www.w3.org/TR/microdata/'),
)));
$form['display_onemap'] = getlocations_element_map_checkbox(t('Show all markers on one map'), $defaults['display_onemap'], '');
$form['display_name'] = getlocations_element_map_checkbox(t('Show Name in display'), $defaults['display_name'], '');
$form['display_street'] = getlocations_element_map_checkbox(t('Show Street in display'), $defaults['display_street'], '');
$form['display_additional'] = getlocations_element_map_checkbox(t('Show Additional in display'), $defaults['display_additional'], '');
$form['display_city'] = getlocations_element_map_checkbox(t('Show City in display'), $defaults['display_city'], '');
$form['display_province'] = getlocations_element_map_checkbox(t('Show Province/state/county in display'), $defaults['display_province'], '');
$form['display_postal_code'] = getlocations_element_map_checkbox(t('Show Postal code in display'), $defaults['display_postal_code'], '');
$form['display_country'] = getlocations_element_map_checkbox(t('Show Country in display'), $defaults['display_country'], '');
$form['country_full'] = getlocations_element_map_checkbox(t('Display full country name'), $defaults['country_full'], '');
$form['display_phone'] = getlocations_element_map_checkbox(t('Show Phone in display'), $defaults['display_phone'], '');
$form['display_mobile'] = getlocations_element_map_checkbox(t('Show Mobile in display'), $defaults['display_mobile'], '');
$form['display_fax'] = getlocations_element_map_checkbox(t('Show Fax in display'), $defaults['display_fax'], '');
// what3words
$what3words_lic = variable_get('getlocations_what3words_lic', array(
'key' => '',
'url' => 'http://api.what3words.com',
));
if ($what3words_lic['key']) {
$form['what3words_display'] = getlocations_element_map_checkbox(t('Show What3Words in display'), $defaults['what3words_display'], '');
}
else {
$form['what3words_display'] = array(
'#type' => 'value',
'#value' => 0,
);
}
$form['nodezoom'] = getlocations_element_map_zoom(t('Zoom'), $defaults['nodezoom'], t('The zoom level for a display map.'));
$form['minzoom_map'] = getlocations_element_map_zoom_map(t('Minimum Zoom'), $defaults['minzoom_map'], t('The Minimum zoom level for a display map.'));
$form['maxzoom_map'] = getlocations_element_map_zoom_map(t('Maximum Zoom'), $defaults['maxzoom_map'], t('The Maximum zoom level for a display map.'));
return $form;
}