You are here

route_planner.admin.inc in Route Planner 6

Same filename and directory in other branches
  1. 7 route_planner.admin.inc

Administrative page callbacks for the route_planner module.

File

route_planner.admin.inc
View source
<?php

/**
 * @file
 * Administrative page callbacks for the route_planner module.
 */

/**
 * Define a form to set the fixed target point.
 *
 * @return
 *   The general settings form code stored in the $form variable, before
 *   converted to HTML.
 */
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);
}

Functions

Namesort descending Description
route_planner_settings_form Define a form to set the fixed target point.