You are here

function _field_timer_jquery_countdown_settings_form in Field Timer 7

Help function.

Build settings form for field_timer_jquery_countdown formatter.

1 call to _field_timer_jquery_countdown_settings_form()
field_timer_field_formatter_settings_form in ./field_timer.module
Implements hook_field_formatter_settings_form().

File

includes/field_timer.inc, line 472
Contains some help functions for formatters and settings forms.

Code

function _field_timer_jquery_countdown_settings_form($settings) {
  $settings_form = array();
  $settings_form['type'] = array(
    '#type' => 'select',
    '#title' => t('Type'),
    '#options' => array(
      'auto' => t('Auto'),
      'timer' => t('Timer'),
      'countdown' => t('Countdown'),
    ),
    '#default_value' => $settings['type'],
  );
  $settings_form['regional'] = array(
    '#type' => 'select',
    '#title' => t('Region'),
    '#default_value' => $settings['regional'],
    '#options' => _field_timer_jquery_countdown_regions(),
  );
  $settings_form['format'] = array(
    '#type' => 'textfield',
    '#title' => t('Format'),
    '#default_value' => $settings['format'],
    '#description' => t('See !documentation for this parameter.', array(
      '!documentation' => l(t('documentation'), 'http://keith-wood.name/countdownRef.html', array(
        'fragment' => 'format',
      )),
    )),
  );
  $settings_form['layout'] = array(
    '#type' => 'textarea',
    '#rows' => 3,
    '#cols' => 60,
    '#title' => t('Layout'),
    '#defualt_value' => $settings['layout'],
    '#description' => t('See !documentation for this parameter.', array(
      '!documentation' => l(t('documentation'), 'http://keith-wood.name/countdownRef.html', array(
        'fragment' => 'layout',
      )),
    )),
  );
  $settings_form['compact'] = array(
    '#type' => 'checkbox',
    '#title' => t('Display in compact format'),
    '#default_value' => $settings['compact'],
  );
  $settings_form['significant'] = array(
    '#type' => 'select',
    '#title' => t('Significant'),
    '#options' => range(0, 7),
    '#default_value' => $settings['significant'],
  );
  $settings_form['timeSeparator'] = array(
    '#type' => 'textfield',
    '#title' => t('Time separator'),
    '#default_value' => $settings['timeSeparator'],
  );
  $settings_form['padZeroes'] = array(
    '#type' => 'checkbox',
    '#title' => t('Pad with zeroes'),
    '#default_value' => $settings['padZeroes'],
  );
  return $settings_form;
}