You are here

function lingotek_community_select_form_submit in Lingotek Translation 7.6

Same name and namespace in other branches
  1. 7.7 lingotek.setup.inc \lingotek_community_select_form_submit()
  2. 7.2 lingotek.setup.inc \lingotek_community_select_form_submit()
  3. 7.3 lingotek.setup.inc \lingotek_community_select_form_submit()
  4. 7.4 lingotek.setup.inc \lingotek_community_select_form_submit()
  5. 7.5 lingotek.setup.inc \lingotek_community_select_form_submit()

Community Select Screen - Form Submit

File

./lingotek.setup.inc, line 391

Code

function lingotek_community_select_form_submit($form, $form_state) {
  $community_selected = $form_state['values']['lingotek_site_community'];
  variable_set('lingotek_community_identifier', $community_selected);
  $communities = (array) json_decode($form_state['values']['lingotek_communities']);
  $community = $communities[$community_selected];
  variable_set('lingotek_oauth_consumer_id', $community->key);
  variable_set('lingotek_oauth_consumer_secret', $community->secret);
  $_SESSION['lingotek_setup_path'][] = 'admin/config/lingotek/community-select';
  drupal_set_message(t('Your site has been securely connected to your community (@community).', array(
    '@community' => $community_selected,
  )));
  drupal_goto('admin/config/lingotek/project-vault-select');

  // Move to Project Select Step.
}