You are here

function biblio_handler_date::options_form in Bibliography Module 7.2

Default options form provides the label widget that all fields should have.

Overrides views_handler_field::options_form

File

views/biblio_handler_date.inc, line 15

Class

biblio_handler_date
A handler to provide proper displays for dates.

Code

function options_form(&$form, &$form_state) {
  $date_formats = array();
  $date_types = system_get_date_types();
  foreach ($date_types as $key => $value) {
    $date_formats[$value['type']] = check_plain(t($value['title'] . ' format')) . ': ' . format_date(REQUEST_TIME, $value['type']);
  }
  $form['date_format'] = array(
    '#type' => 'select',
    '#title' => t('Date format'),
    '#options' => $date_formats,
    '#default_value' => isset($this->options['date_format']) ? $this->options['date_format'] : 'small',
  );
  parent::options_form($form, $form_state);
}