You are here

function getlocations_fields_handler_argument_distance::options_form in Get Locations 7.2

Same name and namespace in other branches
  1. 7 modules/getlocations_fields/handlers/getlocations_fields_handler_argument_distance.inc \getlocations_fields_handler_argument_distance::options_form()

Add a form elements to select options for this argument.

Overrides views_handler_argument::options_form

File

modules/getlocations_fields/handlers/getlocations_fields_handler_argument_distance.inc, line 27
getlocations_fields_handler_argument_distance.inc @author Bob Hutchinson http://drupal.org/user/52366 @copyright GNU GPL

Class

getlocations_fields_handler_argument_distance
Argument handler to accept proximity

Code

function options_form(&$form, &$form_state) {
  parent::options_form($form, $form_state);
  $form['type'] = array(
    '#title' => t('Coordinate Type'),
    '#type' => 'select',
    '#options' => array(
      'latlon' => t('Decimal Latitude and Longitude coordinates, comma delimited'),
    ),
    '#default_value' => $this->options['type'],
    '#description' => t('Type of center point.') . '<br />' . t('Lat/Lon argument format: lat,lon_distance') . '<br />' . t('where distance is either a number or a comma delimited pair of decimal degrees'),
  );

  // Units used.
  $form['search_units'] = getlocations_element_distance_unit($this->options['search_units'], t('Distance unit'), t('Select the unit of distance. Decimal degrees should be comma delimited.'));
  $form['search_method'] = array(
    '#title' => t('Method'),
    '#type' => 'select',
    '#options' => array(
      'mbr' => t('Rectangular Proximity'),
      'dist' => t('Circular Proximity'),
    ),
    '#default_value' => $this->options['search_method'],
    '#description' => t('Method of determining proximity. Please note that Circular Proximity does not work with Decimal degrees.'),
  );
}