You are here

function getdirections_colorbox_settings in Get Directions 7.3

Colorbox settings form

1 call to getdirections_colorbox_settings()
getdirections_settings_form in ./getdirections.admin.inc
Function to display the getdirections admin settings form

File

./getdirections.module, line 2583
Fetches google map directions.

Code

function getdirections_colorbox_settings($defaults) {
  $form = array();
  $form['enable'] = array(
    '#type' => 'checkbox',
    '#title' => t('Enable Colorbox'),
    '#default_value' => $defaults['enable'],
    '#return_value' => 1,
    '#description' => t('Show Getdirections in a Colorbox.'),
  );
  $form['width'] = array(
    '#type' => 'textfield',
    '#title' => t('Colorbox width'),
    '#default_value' => $defaults['width'],
    '#size' => 5,
    '#required' => TRUE,
    // need this to get validation to work
    '#parents' => array(
      'getdirections_colorbox',
      'width',
    ),
    '#prefix' => '<div id="wrap-getdirections-colorbox">',
  );
  $form['height'] = array(
    '#type' => 'textfield',
    '#title' => t('Colorbox height'),
    '#default_value' => $defaults['height'],
    '#size' => 5,
    '#required' => TRUE,
    // need this to get validation to work
    '#parents' => array(
      'getdirections_colorbox',
      'height',
    ),
    '#suffix' => '</div>',
  );
  return $form;
}