You are here

function rooms_booking_form_rooms_booking_settings_alter in Rooms - Drupal Booking for Hotels, B&Bs and Vacation Rentals 7

Implements hook_form_FORM_ID_alter().

FORM_ID = rooms_booking_settings

File

modules/rooms_booking/rooms_booking.module, line 468
Manage Bookings - Bookings are tied to a customer profile and possible a Unit ID and Order ID.

Code

function rooms_booking_form_rooms_booking_settings_alter(&$form, &$form_state, $form_id) {
  form_load_include($form_state, 'inc', 'rules', 'ui/ui.forms');
  $form['rooms_admin_settings'] = array(
    '#type' => 'fieldset',
    '#group' => 'rooms_settings',
    '#title' => t('Administrative settings'),
  );
  $form['rooms_admin_settings']['rooms_booking_expiration_time'] = array(
    '#title' => t('Cart expiration time'),
    '#type' => 'rules_duration',
    '#default_value' => variable_get('rooms_booking_expiration_time', 1800),
    '#description' => t('Set the time after the carts will expire.'),
    '#weight' => 50,
  );
  $form['rooms_booking_settings']['rooms_booking_display_children'] = array(
    '#type' => 'checkbox',
    '#title' => t('Display children choice in booking form'),
    '#description' => t('Select whether both group size and children can be shown.'),
    '#default_value' => variable_get('rooms_booking_display_children', ROOMS_DISPLAY_CHILDREN),
    '#weight' => 50,
  );
}