You are here

function bat_date_format_form in Booking and Availability Management Tools for Drupal 7

Main booking settings form.

1 string reference to 'bat_date_format_form'
bat_menu in ./bat.module
Implements hook_menu().

File

./bat.module, line 68
Provides basic underlying functionality and configuration options used by all BAT modules.

Code

function bat_date_format_form($form, &$form_state) {
  $form['bat_date_format'] = array(
    '#type' => 'item',
    '#title' => t('BAT PHP Date Format'),
    '#description' => t("A custom date format for events, search summary and calendar pop-ups. Define a php date format string like 'Y-m-d H:i' (see <a href=\"@link\">http://php.net/date</a> for more details).", array(
      '@link' => 'http://php.net/date',
    )),
  );
  $form['bat_date_format']['bat_date_format'] = array(
    '#type' => 'textfield',
    '#size' => 12,
    '#prefix' => '<div class="container-inline form-item">' . t('Date format') . ': &nbsp;',
    '#suffix' => '</div>',
    '#default_value' => variable_get('bat_date_format', 'Y-m-d H:i'),
  );
  $form['bat_date_format']['bat_daily_date_format'] = array(
    '#type' => 'textfield',
    '#size' => 12,
    '#prefix' => '<div class="container-inline form-item">' . t('Daily date format') . ': &nbsp;',
    '#suffix' => '</div>',
    '#default_value' => variable_get('bat_daily_date_format', 'Y-m-d'),
  );
  $form['bat_hourly_format'] = array(
    '#type' => 'item',
    '#title' => 'Hourly PHP Date Format',
    '#description' => t("Define a php date format string like 'H:i' (see <a href=\"@link\">http://php.net/date</a> for more details).", array(
      '@link' => 'http://php.net/date',
    )),
  );
  $form['bat_hourly_format']['bat_hourly_date_format'] = array(
    '#type' => 'textfield',
    '#size' => 12,
    '#prefix' => '<div class="container-inline form-item">' . t('Time format') . ': &nbsp;',
    '#suffix' => '</div>',
    '#default_value' => variable_get('bat_hourly_date_format', 'H:i'),
  );
  return system_settings_form($form);
}