You are here

function getlocations_search_settings_form in Get Locations 7

Same name and namespace in other branches
  1. 7.2 modules/getlocations_search/getlocations_search.admin.inc \getlocations_search_settings_form()

Function to display the getlocations_search admin settings form

Return value

Returns the form.

1 string reference to 'getlocations_search_settings_form'
getlocations_search_menu in modules/getlocations_search/getlocations_search.module
Implements hook_menu().

File

modules/getlocations_search/getlocations_search.admin.inc, line 17
getlocations_search.admin.inc @author Bob Hutchinson http://drupal.org/user/52366 @copyright GNU GPL

Code

function getlocations_search_settings_form() {
  $getlocations_search_defaults = getlocations_search_defaults();
  $form = array();
  $pagetitle = '<div><h4>' . t('Getlocations Search') . '</h4></div>';
  $form['pagetitle'] = array(
    '#markup' => $pagetitle,
  );
  $form += _getlocations_search_settings_form($getlocations_search_defaults, 'admin');
  $form['getlocations_search_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,
  );
  $getlocations_search_paths = getlocations_search_paths_get();
  $form['getlocations_search_paths']['getlocations_search_path'] = getlocations_element_path(t('Path to getlocations_search javascript file'), $getlocations_search_paths['getlocations_search_path'], 70, 128, t('Where the getlocations_search javascript file is located.'));
  $form['getlocations_search_paths']['getlocations_search_admin_path'] = getlocations_element_path(t('Path to getlocations_search admin javascript file'), $getlocations_search_paths['getlocations_search_admin_path'], 70, 128, t('Where the getlocations_search admin javascript file is located.'));
  $form['getlocations_search_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_search_settings_form';
  $form['#validate'][] = 'getlocations_search_settings_validate';
  return $form;
}