You are here

function lingotek_project_select_form_submit in Lingotek Translation 7.2

Project Select Screen - Form Submit

File

./lingotek.setup.inc, line 476
Lingotek Easy Install Process.

Code

function lingotek_project_select_form_submit($form, $form_state) {
  $project_id = '';
  $workflow_id = '';
  $project_string = $form_state['values']['lingotek_site_project'];

  // This can come back as just the ProjectID, OR the ProjectID ||| WorkflowID jammed together, so check the string.
  if (strpos($project_string, '|||')) {

    // Returns a position or false if not found.
    $parts = explode('|||', $project_string);
    $project_id = $parts[0];
    $workflow_id = $parts[1];
  }
  else {
    $project_id = $project_string;
  }
  variable_set('lingotek_project', $project_id);
  variable_set('lingotek_workflow', $workflow_id);
  $_SESSION['lingotek_setup_path'][] = 'admin/config/lingotek/project-select';
  drupal_set_message(t('Your Lingotek project selection has been saved.'));
  drupal_goto('admin/config/lingotek/language-settings');

  // Move to Source Language Select Step.
}