You are here

function lingotek_push_form in Lingotek Translation 7.5

Same name and namespace in other branches
  1. 7.7 lingotek.page.inc \lingotek_push_form()
  2. 7.2 lingotek.page.inc \lingotek_push_form()
  3. 7.3 lingotek.page.inc \lingotek_push_form()
  4. 7.4 lingotek.page.inc \lingotek_push_form()
  5. 7.6 lingotek.page.inc \lingotek_push_form()

Upload Content Form. (Upload to Lingotek)

1 string reference to 'lingotek_push_form'
lingotek_pm in ./lingotek.page.inc
Page callback for the Lingotek local task on node detail pages.

File

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

Code

function lingotek_push_form($form, $form_state, $node) {
  $form = array();
  $last_uploaded_message = isset($node->lingotek['last_uploaded']) ? ' (' . t('Last uploaded @human_readable_timestamp ago.', array(
    '@human_readable_timestamp' => lingotek_human_readable_timestamp($node->lingotek['last_uploaded']),
  )) . ')' : '';
  $form['content_push'] = array(
    '#type' => 'fieldset',
    '#title' => t('Upload'),
    '#description' => t("Upload this node's content to Lingotek for translation. @last_uploaded_message", array(
      '@last_uploaded_message' => $last_uploaded_message,
    )),
    '#collapsible' => TRUE,
    '#collapsed' => FALSE,
  );
  $form['content_push']['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Upload'),
  );
  $form['node_id'] = array(
    '#type' => 'hidden',
    '#value' => $node->nid,
  );
  return $form;
}