You are here

function slick_devel_form_settings in Slick extras 7.2

Same name and namespace in other branches
  1. 7.3 slick_devel/includes/slick_devel.admin.inc \slick_devel_form_settings()

Form for advanced module settings.

1 string reference to 'slick_devel_form_settings'
slick_devel_menu in slick_devel/slick_devel.module
Implements hook_menu().

File

slick_devel/includes/slick_devel.admin.inc, line 10
Slick development admin.

Code

function slick_devel_form_settings() {
  $form = array();
  $form['library'] = array(
    '#type' => 'fieldset',
    '#title' => 'Library',
    '#description' => t("Unless you are helping to develop the Slick module, all these are not needed to run Slick. Requires slick > 1.4."),
  );
  $form['library']['slick_devel'] = array(
    '#type' => 'checkbox',
    '#title' => t('Enable development mode'),
    '#description' => t('Load the development version of the Slick library. Only useful to test new features of the library. Leave it unchecked at production.'),
    '#default_value' => variable_get('slick_devel', FALSE),
  );
  $form['library']['slick_devel_debug'] = array(
    '#type' => 'checkbox',
    '#title' => t('Use non-minified slick.load.js'),
    '#description' => t('Replace slick.load.min.js with slick.load.js. Only useful to debug it.'),
    '#default_value' => variable_get('slick_devel_debug', FALSE),
  );
  $form['library']['slick_devel_disable'] = array(
    '#type' => 'checkbox',
    '#title' => t('Disable module slick.load.min.js or slick.load.js'),
    '#description' => t('Slick will not run unless you initiliaze it yourself.'),
    '#default_value' => variable_get('slick_devel_disable', FALSE),
    '#states' => array(
      'invisible' => array(
        array(
          ':input[name="slick_devel_debug"]' => array(
            'checked' => TRUE,
          ),
        ),
      ),
    ),
  );
  $form['library']['slick_devel_replace'] = array(
    '#type' => 'checkbox',
    '#title' => t('Replace the slick.load.min.js with development version: slick.load.devel.js'),
    '#description' => t('Use slick.load.devel.js to debug the Slick without modifying slick.load.min.js.'),
    '#default_value' => variable_get('slick_devel_replace', FALSE),
    '#states' => array(
      'invisible' => array(
        array(
          ':input[name="slick_devel_disable"]' => array(
            'checked' => TRUE,
          ),
        ),
      ),
    ),
  );
  return system_settings_form($form);
}