You are here

function globallink_form_node_type_form_validate in GlobalLink Connect for Drupal 7.6

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

Validation to check if any active submission exists for this content type. Only if there is a change in multilingual options.

1 string reference to 'globallink_form_node_type_form_validate'
globallink_form_node_type_form_alter in ./globallink.module
Adds a validation handler to check for change in multilingual options.

File

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

Code

function globallink_form_node_type_form_validate($form, &$form_state) {
  module_load_include('inc', 'globallink', 'globallink');
  $language_content_type = $form_state['values']['language_content_type'];
  if ($language_content_type != 2 && globallink_pending_submission_exists_for_content_type($form_state['values']['old_type'])) {
    form_set_error('language_content_type', t('Active submission exists for this content type in GlobalLink.'));
  }
}