You are here

function jquery_colorpicker_settings in Jquery Colorpicker 6.2

Same name and namespace in other branches
  1. 6 jquery_colorpicker.module \jquery_colorpicker_settings()

Callback function for the URL admin/settings/jquery_colorpicker This function creates the settings page for the module

1 string reference to 'jquery_colorpicker_settings'
jquery_colorpicker_menu in ./jquery_colorpicker.module
Implementation of hook_menu()

File

./jquery_colorpicker.module, line 215

Code

function jquery_colorpicker_settings() {

  // First we create a fieldset to make it all look nice. If ever other settings are enabled, this will keep the page looking nice
  $form['ie6'] = array(
    '#type' => 'fieldset',
    '#title' => t('Internet Explorer 6'),
  );

  // Next we add a description of the necessary steps to enable IE6 support
  $form['ie6']['description'] = array(
    '#value' => '<p>' . t('Internet Explorer 6 does not support transparencies in .png files. They are rendered with a non-transparent blue glow anywhere where there should be transparency. Since jquery colorpicker relies on transparent .png files to work, this means that out of the box, the jquery colorpicker will not work with IE6. You can solve this using the following steps:') . '</p><ol><li>' . t('Inside the jquery colorpicker module folder (generally located at sites/all/modules), create a new folder named "twin_helix". If the jquery colorpicker module is in the standard location, this means you will have the folder sites/all/modules/jquery_colorpicker/twin_helix') . '</li><li>' . t('Download the iepngfix.zip from !twin_helix', array(
      '!twin_helix' => l('Twin Helix', 'http://www.twinhelix.com/css/iepngfix/', array(
        'absolute' => TRUE,
      )),
    )) . '</li><li>' . t('Unpack the zip file, and place the following three files into the twin_helix folder you created in step 1:') . '<ul><li>iepngfix.htc</li><li>blank.gif</li><li>iepngfix_tilebg.js</li></ul></li><li>' . t('Check the box below, and save this page') . '</li></ol>',
  );

  // And finally we add a checkbox so the user can indicate that IE6 should be supported
  $form['ie6']['jquery_colorpicker_ie6_support'] = array(
    '#type' => 'checkbox',
    '#title' => t('Support IE6'),
    '#default_value' => variable_get('jquery_colorpicker_ie6_support', 0),
  );
  return system_settings_form($form);
}