You are here

function jquery_calendar_form_settings in jQuery World Calendars API 7

Form callback for jQuery World Calendars administration.

See also

system_settings_form()

1 string reference to 'jquery_calendar_form_settings'
jquery_calendar_menu in ./jquery_calendar.module
Implements hook_menu().

File

./jquery_calendar.admin.inc, line 14
Contains administration and demonstration form callbacks.

Code

function jquery_calendar_form_settings() {
  $form = array();

  // If the module is not correctly installed, do not show configs.
  if (!_jquery_calendar_form_requirements($form)) {
    return $form;
  }

  // Library compression level.
  $form['jquery_calendar_compression_level'] = array(
    '#type' => 'radios',
    '#title' => t('Library default compression level'),
    '#description' => t('Choose default library files compression level. This will be used as a fallback in case that the API implementer does not provide a level.'),
    '#default_value' => variable_get('jquery_calendar_compression_level'),
    '#options' => array(
      'pack' => t('Packed - <em>7.1K core.</em>'),
      'min' => t('Minified - <em>10.6K core.</em>'),
      'normal' => t('No Compression - <em>30.3K core.</em>'),
    ),
  );

  // Calendars default theme.
  $form['jquery_calendar_datepicker_theme'] = array(
    '#type' => 'select',
    '#title' => t('Datepicker default theme'),
    '#description' => t('Choose which datepicker theme you want to use. This will override datepicker theme settings set by other modules. You can add your own customized theme by placing it into the <code><u>!dir</u></code> directory respecting this filename format: <strong><em>theme-name</em>.calendars.picker.css</strong>', array(
      '!dir' => 'sites/all/libraries/jquery.calendars',
    )),
    '#default_value' => variable_get('jquery_calendar_datepicker_theme'),
    '#options' => _jquery_calendar_datepicker_themes(),
  );
  return system_settings_form($form);
}