You are here

function jq_maphilight_admin_settings in jQuery Map Hilight 5

Same name and namespace in other branches
  1. 6 jq_maphilight.module \jq_maphilight_admin_settings()
  2. 7 jq_maphilight.module \jq_maphilight_admin_settings()

jq_maphilight admin/settings page; implements hook_form

1 string reference to 'jq_maphilight_admin_settings'
jq_maphilight_menu in ./jq_maphilight.module
implement hook_menu

File

./jq_maphilight.module, line 49
Configurable javascript based image map hilighting using the jquery map hilight plugin.

Code

function jq_maphilight_admin_settings() {
  $form = array();
  $form['jq_maphilight_status'] = array(
    '#type' => 'fieldset',
    '#title' => t('jQuery Map Hilight Plugin Status'),
    '#weight' => -10,
    '#description' => _jq_maphilight_available() !== false ? t('The Map Hilight jQuery plugin is available at: /') . _jq_maphilight_available() : '<em><span style="color: #A50000;">' . t('The Map Hilight jQuery plugin is unavailable or not located in the jquery_plugin module directory.') . '</span></em>',
    '#collapsible' => TRUE,
  );
  $form['jq_maphilight_settings'] = array(
    '#type' => 'fieldset',
    '#title' => t('jQuery Map Hilight Plugin Settings'),
    '#description' => 'Be sure to add <strong><em>class="jq_maphilight"</em></strong> to the IMG tag of all image maps you want hilighted.',
  );
  $form['jq_maphilight_settings']['jq_maphilight_fill'] = array(
    '#type' => 'select',
    '#title' => t('Fill'),
    '#default_value' => variable_get('jq_maphilight_fill', 'true'),
    '#options' => array(
      'true' => t('TRUE'),
      'false' => t('FALSE'),
    ),
    '#description' => 'Specify whether or not the hilighted area should be filled.',
  );
  $form['jq_maphilight_settings']['jq_maphilight_fillcolor'] = array(
    '#type' => 'textfield',
    '#title' => t('Fill Color'),
    '#default_value' => variable_get('jq_maphilight_fillcolor', 'ff0000'),
    '#size' => 8,
    '#description' => 'Specify the color of the fill. Use HTML # notation without the #.',
  );
  $form['jq_maphilight_settings']['jq_maphilight_fillopacity'] = array(
    '#type' => 'select',
    '#title' => t('Fill Opacity'),
    '#default_value' => variable_get('jq_maphilight_fillopacity', 2),
    '#options' => drupal_map_assoc(array(
      0,
      1,
      2,
      3,
      4,
      5,
      6,
      7,
      8,
      9,
      10,
    )),
    '#description' => 'Specify the opacity of the fill (0 = lightest, 10 = darkest).',
  );
  $form['jq_maphilight_settings']['jq_maphilight_stroke'] = array(
    '#type' => 'select',
    '#title' => t('Stroke (outline)'),
    '#options' => array(
      'true' => t('TRUE'),
      'false' => t('FALSE'),
    ),
    '#default_value' => variable_get('jq_maphilight_stroke', 'true'),
    '#description' => 'Specify whether or not the hilighted area will be outlined.',
  );
  $form['jq_maphilight_settings']['jq_maphilight_strokecolor'] = array(
    '#type' => 'textfield',
    '#title' => t('Stroke Color'),
    '#default_value' => variable_get('jq_maphilight_strokecolor', 'D51910'),
    '#size' => 8,
    '#description' => 'Specify the color of the outline. Use HTML # notation without the #.',
  );
  $form['jq_maphilight_settings']['jq_maphilight_strokewidth'] = array(
    '#type' => 'textfield',
    '#title' => t('Stroke Width'),
    '#default_value' => variable_get('jq_maphilight_strokewidth', 2),
    '#size' => 8,
    '#description' => 'Specify the width of the outline in pixels.',
  );
  $form['jq_maphilight_settings']['jq_maphilight_strokeopacity'] = array(
    '#type' => 'select',
    '#title' => t('Stroke Opacity'),
    '#default_value' => variable_get('jq_maphilight_strokeopacity', 10),
    '#options' => drupal_map_assoc(array(
      0,
      1,
      2,
      3,
      4,
      5,
      6,
      7,
      8,
      9,
      10,
    )),
    '#description' => 'Specify the opacity of the outline (0 = lightest, 10 = darkest).',
  );
  $form['jq_maphilight_settings']['jq_maphilight_fade'] = array(
    '#type' => 'select',
    '#title' => t('Fade'),
    '#options' => array(
      'true' => t('TRUE'),
      'false' => t('FALSE'),
    ),
    '#default_value' => variable_get('jq_maphilight_fade', 'true'),
    '#description' => 'Specify whether or not the hilighting uses a fade transition.',
  );
  return system_settings_form($form);
}