You are here

function lingotek_node_disassociate_form in Lingotek Translation 7.4

Form constructor for the node disassociate form. (Formerly "Reset Translations")

1 string reference to 'lingotek_node_disassociate_form'
lingotek_disassociate_nodes in ./lingotek.bulk_grid.inc
Callback function to disassociate translations for multiple nodes at a time

File

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

Code

function lingotek_node_disassociate_form($form, $form_state, $nids = array(), $collapse_fieldset = TRUE) {
  if (isset($form_state['nids'])) {
    $nids = $form_state['nids'];
    $collapse_fieldset = FALSE;
  }
  $form = array();
  if (!is_array($nids)) {
    $nids = array(
      $nids,
    );
  }
  $form['disassociate_translations'] = array(
    '#type' => 'fieldset',
    '#title' => t('Disassociate Translations'),
    '#description' => t("Should only be used to change the Lingotek project or TM vault associated with the node’s translation. Disassociates node translations on Lingotek’s servers from the copies downloaded to Drupal. Additional translation using Lingotek will require re-uploading the node’s content to restart the translation process."),
    '#collapsible' => $collapse_fieldset,
    '#collapsed' => $collapse_fieldset,
  );
  $form['disassociate_translations']['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Disassociate Translations'),
  );
  $form['node_id'] = array(
    '#type' => 'hidden',
    '#value' => json_encode($nids),
  );
  return $form;
}