You are here

function wysiwyg_map_settings_form in WYSIWYG Map 7

Form builder.

1 string reference to 'wysiwyg_map_settings_form'
wysiwyg_map_menu in ./wysiwyg_map.module
Implements hook_menu().

File

./wysiwyg_map.module, line 331
wysiwyg_map.module

Code

function wysiwyg_map_settings_form($form, &$form_state) {
  $description_text = "\n    <p>Google maps no longer work properly without an API key. To get an API key you must create a Google Maps billing account and follow the instructions to create API credentials.</p>\n    <p>Please see <a href=\"https://developers.google.com/maps/documentation/javascript/get-api-key\" target=\"_blank\">Google\\'s documentation pages</a> for more information on API keys.</p>\n  ";
  $form['wysiwyg_map_api_keys'] = array(
    '#type' => 'fieldset',
    '#title' => t('Google Maps Javascript API keys'),
    '#description' => $description_text,
    '#weight' => 5,
    '#collapsible' => TRUE,
    '#collapsed' => FALSE,
  );
  $form['wysiwyg_map_api_keys']['wysiwyg_map_api_key'] = array(
    '#type' => 'textfield',
    '#title' => t('API key'),
    '#description' => 'Used by either Standard or Premium API.',
    '#default_value' => variable_get('wysiwyg_map_api_key', ''),
  );
  $form['wysiwyg_map_api_keys']['wysiwyg_map_client_id'] = array(
    '#type' => 'textfield',
    '#title' => t('Client ID'),
    '#description' => 'Used by Premium API. <b>Please note:</b> for Premium API only, use either the API key field or the Client ID field, not both.',
    '#default_value' => variable_get('wysiwyg_map_client_id', ''),
  );
  return system_settings_form($form);
}