You are here

function getlocations_gps_settings_form in Get Locations 7.2

Same name and namespace in other branches
  1. 7 modules/getlocations_gps/getlocations_gps.module \getlocations_gps_settings_form()

Function to display the getlocations_gps admin settings form

Return value

Returns the form.

1 string reference to 'getlocations_gps_settings_form'
getlocations_gps_menu in modules/getlocations_gps/getlocations_gps.module
Implements hook_menu().

File

modules/getlocations_gps/getlocations_gps.module, line 99
getlocations_gps.module @author Bob Hutchinson http://drupal.org/user/52366 @copyright GNU GPL

Code

function getlocations_gps_settings_form() {
  $getlocations_gps_defaults = getlocations_gps_defaults();
  $getlocations_gps_paths = getlocations_gps_paths_get();
  $form = array();
  $form['getlocations_gps_defaults'] = array(
    '#type' => 'fieldset',
    '#title' => t('Getlocations GPS Default settings'),
    '#description' => t('The settings here will provide the defaults for Getlocations GPS.'),
    '#collapsible' => TRUE,
    '#collapsed' => FALSE,
    // This will store all the defaults in one variable.
    '#tree' => TRUE,
  );
  $form['getlocations_gps_defaults'] += getlocations_gps_map_display_options_form($getlocations_gps_defaults);
  $form['getlocations_gps_paths'] = array(
    '#type' => 'fieldset',
    '#title' => t('Javascript paths'),
    '#description' => t('For advanced users who want to supply their own javascript.'),
    '#collapsible' => TRUE,
    '#collapsed' => TRUE,
    // This will store all the defaults in one variable.
    '#tree' => TRUE,
  );
  $form['getlocations_gps_paths']['getlocations_gps_path'] = getlocations_element_path(t('Path to getlocations_gps javascript file'), $getlocations_gps_paths['getlocations_gps_path'], 70, 128, t('Where the getlocations_gps javascript file is located.'));
  $form['getlocations_gps_paths']['getlocations_gps_admin_path'] = getlocations_element_path(t('Path to getlocations_gps_admin javascript file'), $getlocations_gps_paths['getlocations_gps_admin_path'], 70, 128, t('Where the getlocations_gps_admin javascript file is located.'));
  $form['getlocations_gps_paths']['reset'] = getlocations_element_dd(t('Reset'), 0, array(
    0 => t('No'),
    1 => t('Reset'),
    2 => t('Reset to minified'),
  ), t('Reset the paths to the defaults.'));
  $form = system_settings_form($form);
  unset($form['#theme']);
  $form['#theme'] = 'getlocations_gps_settings_form';
  $form['#validate'][] = 'getlocations_gps_settings_validate';
  return $form;
}