You are here

function lingotek_node_content_reset_form_submit in Lingotek Translation 7.3

Submit handler for the lingotek_node_content_reset form.

File

./lingotek.page.inc, line 179
Lingotek Tab for Nodes

Code

function lingotek_node_content_reset_form_submit($form, $form_state) {
  $drupal_node_id = $form_state['values']['node_id'];
  $doc_id = LingotekSync::getDocIdFromNodeId($drupal_node_id);
  $api = LingotekApi::instance();
  $api
    ->removeDocument($doc_id);
  $node = lingotek_node_load_default($drupal_node_id);
  drupal_set_message(t('Translations reset for "@node_title".', array(
    '@node_title' => $node->title,
  )));
}