You are here

function availability_calendar_field_widget_settings_form in Availability Calendars 7.3

Same name and namespace in other branches
  1. 7.5 availability_calendar.field.inc \availability_calendar_field_widget_settings_form()
  2. 7.4 availability_calendar.field.inc \availability_calendar_field_widget_settings_form()

Implements hook_field_widget_settings_form @link http://api.drupal.org/api/drupal/modules--field_ui--field_ui.api.php/fun...

File

./availability_calendar.field.inc, line 206
Availability Calendar module. Defines an availability calendar field.

Code

function availability_calendar_field_widget_settings_form($field, $instance) {
  $form = array();
  $widget = $instance['widget'];
  $type = $widget['type'];
  $settings = $widget['settings'];
  $form['allow_disable'] = array(
    '#type' => 'checkbox',
    '#title' => t('Allow to disable the calendar for a @type', array(
      '@type' => $instance['bundle'],
    )),
    '#default_value' => $settings['allow_disable'],
    '#weight' => 1,
  );
  $form += availability_calendar_field_widget_and_formatter_settings_form($field, $instance, TRUE, $type, $settings);
  return $form;
}