You are here

function tmgmt_local_translation_reassign_form in Translation Management Tool 7

Similar to form for assigning multiple tasks to translator, but here we also allow no user selection.

See also

tmgmt_local_translation_assign_form().

1 string reference to 'tmgmt_local_translation_reassign_form'
tmgmt_local_menu in translators/tmgmt_local/tmgmt_local.module
Implements hook_menu().

File

translators/tmgmt_local/includes/tmgmt_local.pages.inc, line 460
Provides page and forms callbacks.

Code

function tmgmt_local_translation_reassign_form($form, &$form_state, $tasks) {
  $form_state['tasks'] = explode(',', $tasks);
  $roles = tmgmt_local_translator_roles();
  if (empty($roles)) {
    drupal_set_message(t('No user role has the "provide translation services" permission. <a href="@url">Configure permissions</a> for the Local translator module.', array(
      '@url' => url('admin/people/permissions'),
    )), 'warning');
  }
  $form['tuid'] = array(
    '#title' => t('Assign to'),
    '#type' => 'select',
    '#empty_option' => t('Select user'),
    '#options' => tmgmt_local_get_translators_for_tasks($form_state['tasks']),
  );
  $form['actions']['#type'] = 'actions';
  $form['actions']['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Reassign tasks'),
  );
  return $form;
}