You are here

function node_import_delete_form in Node import 6

Delete a task.

1 string reference to 'node_import_delete_form'
node_import_menu in ./node_import.module
Implementation of hook_menu().

File

./node_import.admin.inc, line 1021

Code

function node_import_delete_form(&$form_state, $task) {
  $form = array();
  if ($task['status'] != NODE_IMPORT_STATUS_DONE) {
    $form[] = array(
      '#type' => 'markup',
      '#value' => t('This import task cannnot be deleted as it has not finished yet.'),
    );
    return $form;
  }
  $form['taskid'] = array(
    '#type' => 'value',
    '#value' => $task['taskid'],
  );
  return confirm_form($form, t('Are you sure you want to delete %title?', array(
    '%title' => $task['name'],
  )), isset($_GET['destination']) ? $_GET['destination'] : 'admin/content/node_import/' . $task['taskid'], t('This action cannot be undone.'), t('Delete'), t('Cancel'));
}