You are here

function tzfield_timezone_picker_after_build in Time Zone Field 7

After-build callback for time zone picker.

1 string reference to 'tzfield_timezone_picker_after_build'
tzfield_field_widget_options_select_form_alter in ./tzfield.module
Implements hook_field_widget_options_select_form_alter().

File

./tzfield.module, line 153
Defines a time zone field type.

Code

function tzfield_timezone_picker_after_build($element) {
  $settings['target'] = '#' . $element['#id'];
  $settings['pin'] = '.timezone-picker-pin';
  $element['#attached']['js'][] = array(
    'data' => array(
      'timezonePicker' => array(
        $element['#map_id'] => $settings,
      ),
    ),
    'type' => 'setting',
  );
  return $element;
}