You are here

function oa_wizard_entity_delete_form_submit in Open Atrium Wizard 7.2

Execute node deletion

File

./oa_wizard.admin.inc, line 106
Admin form for the Wizards.

Code

function oa_wizard_entity_delete_form_submit($form, &$form_state) {
  if ($form_state['values']['confirm']) {
    $entity = $form_state['entity'];
    oa_wizard_delete($entity->wizard_id);
    watchdog('oa_wizard', '@type: deleted %title.', array(
      '@type' => $entity->bundle,
      '%title' => $entity->title,
    ));
    drupal_set_message(t('@type %title has been deleted.', array(
      '@type' => command_buttons_entities_title($entity->bundle),
      '%title' => $entity->title,
    )));
  }
  $form_state['redirect'] = 'admin/structure/wizards';
}