You are here

function route_planner_settings_form in Route Planner 6

Same name and namespace in other branches
  1. 7 route_planner.admin.inc \route_planner_settings_form()

Define a form to set the fixed target point.

Return value

The general settings form code stored in the $form variable, before converted to HTML.

1 string reference to 'route_planner_settings_form'
route_planner_menu in ./route_planner.module
Implements hook_menu().

File

./route_planner.admin.inc, line 14
Administrative page callbacks for the route_planner module.

Code

function route_planner_settings_form() {
  $form['route_planner'] = array(
    '#type' => 'fieldset',
    '#title' => t('Route planner settings'),
  );
  $form['route_planner']['route_planner_address'] = array(
    '#type' => 'textfield',
    '#description' => t('Your point of interesst or company address.'),
    '#title' => t('Target address'),
    '#default_value' => variable_get('route_planner_address', 'Hamburg, Germany'),
  );
  $form['route_planner']['token_help']['tokens'] = array(
    '#theme' => 'token_tree',
    '#token_types' => array(
      'node',
    ),
  );
  $form['route_planner']['map'] = array(
    '#type' => 'fieldset',
    '#title' => t('Map settings'),
  );
  $form['route_planner']['map']['route_planner_map_height'] = array(
    '#type' => 'textfield',
    '#title' => t('Map height'),
    '#description' => t('A fixed height for example 300px.'),
    '#size' => 10,
    '#default_value' => variable_get('route_planner_map_height', '300px'),
  );
  $form['route_planner']['map']['route_planner_map_width'] = array(
    '#type' => 'textfield',
    '#title' => t('Map width'),
    '#description' => t('A width value in % or px, for example 300px or 100%.'),
    '#size' => 10,
    '#default_value' => variable_get('route_planner_map_width', '100%'),
  );
  $form['route_planner']['map']['route_planner_map_zoom'] = array(
    '#type' => 'textfield',
    '#title' => t('Zoom level'),
    '#description' => t('A value between 1 and 100 (a normal value is around 10).'),
    '#size' => 10,
    '#default_value' => variable_get('route_planner_map_zoom', 10),
  );
  return system_settings_form($form);
}