You are here

function lingotek_disconnect_account in Lingotek Translation 7.7

1 string reference to 'lingotek_disconnect_account'
lingotek_menu in ./lingotek.module
Implements hook_menu().

File

./lingotek.admin.inc, line 2549

Code

function lingotek_disconnect_account($entity_type = 'node', $entity_ids = array()) {
  ctools_include('node.pages', 'node', '');
  ctools_include('modal');
  ctools_include('ajax');
  $entity_ids = !is_array($entity_ids) ? explode(',', $entity_ids) : $entity_ids;
  $form_state = array(
    'ajax' => TRUE,
    'entity_ids' => $entity_ids,
    'entity_type' => $entity_type,
  );
  $output = ctools_modal_form_wrapper('lingotek_disconnect_form', $form_state);
  if (!empty($form_state['executed'])) {
    $commands = array();
    $commands[] = ctools_ajax_command_redirect('admin/config/regional/lingotek/new-account', 750);
    print ajax_render($commands);
    drupal_exit();
  }
  print ajax_render($output);
}