You are here

function globallink_form_field_ui_field_edit_form_alter in GlobalLink Connect for Drupal 7.7

Same name and namespace in other branches
  1. 7.5 globallink.module \globallink_form_field_ui_field_edit_form_alter()
  2. 7.6 globallink.module \globallink_form_field_ui_field_edit_form_alter()

Implements hook_form_FORM_ID_alter().

File

./globallink.module, line 837
GlobalLink translation module.

Code

function globallink_form_field_ui_field_edit_form_alter(&$form, $form_state) {
  module_load_include('inc', 'globallink', 'globallink');
  $field_type = $form['#field']['type'];
  switch ($field_type) {
    case 'list_boolean':
    case 'image':
    case 'file':
    case 'list_integer':
    case 'list_float':
    case 'list_text':
    case 'taxonomy_term_reference':
    case 'field_collection':
      break;
    default:
      $field_name = $form['#field']['field_name'];
      $entity_type = $form['#instance']['entity_type'];
      $bundle_name = $form['#instance']['bundle'];
      if ($entity_type == 'field_collection_item') {
        break;
      }
      if (!globallink_translation_supported($bundle_name)) {
        break;
      }
  }
  $form['#submit'][] = 'globallink_form_field_ui_field_edit_form_submit';
}