gmap_geo_widget_settings

gmap_geo/gmap_geo.module, line 49

Versions
6
gmap_geo_widget_settings($op, $widget)

Implementation of hook_widget_settings(). Adds a field to set a GMap macro for the location picker map.

Code

<?php
function gmap_geo_widget_settings($op, $widget) {
  switch ($op) {
    case 'form':
      $form = array();
      $form['gmap_geo_picker_macro'] = array(
        '#type' => 'textfield',
        '#title' => 'GMap macro',
        '#default_value' => $widget['gmap_geo_picker_macro'] ? $widget['gmap_geo_picker_macro'] : '[gmap]',
        '#description' => t("A GMap macro describing the initial location picker map. <em>[gmap]</em> displays a map with the settings from !gmap-admin.", array('!gmap-admin' => l('admin/settings/gmap', 'admin/settings/gmap'))),
      );
      return $form;
    case 'save':
      return array('gmap_geo_picker_macro');
  }
}
?>