function tmgmt_node_ui_translate_form_submit in Translation Management Tool 7
Submit callback for the node translation overview form.
1 string reference to 'tmgmt_node_ui_translate_form_submit'
- tmgmt_node_ui_node_form in sources/
node/ ui/ tmgmt_node_ui.pages.inc - Node translation overview form. This form overrides the Drupal core or i18n Content Translation page with a tableselect form.
File
- sources/
node/ ui/ tmgmt_node_ui.pages.inc, line 102 - Provides page and form callbacks for the Translation Management Tool Node Source User Interface module.
Code
function tmgmt_node_ui_translate_form_submit($form, &$form_state) {
$node = $form_state['node'];
$values = $form_state['values'];
$jobs = array();
foreach (array_keys(array_filter($values['languages'])) as $langcode) {
// Create the job object.
$job = tmgmt_job_create($node->language, $langcode, $GLOBALS['user']->uid);
// Add the job item.
$job
->addItem('node', 'node', $node->nid);
// Append this job to the array of created jobs so we can redirect the user
// to a multistep checkout form if necessary.
$jobs[$job->tjid] = $job;
}
tmgmt_ui_job_checkout_and_redirect($form_state, $jobs);
}