You are here

function crm_core_contact_ui_form_submit_delete in CRM Core 7

Redirect user on case delete form.

1 string reference to 'crm_core_contact_ui_form_submit_delete'
crm_core_contact_ui_form in modules/crm_core_contact_ui/crm_core_contact_ui.pages.inc
Form callback: create or edit a contact.

File

modules/crm_core_contact_ui/crm_core_contact_ui.pages.inc, line 143

Code

function crm_core_contact_ui_form_submit_delete($form, &$form_state) {
  $destination = array();
  if (isset($_GET['destination'])) {
    $destination = drupal_get_destination();
    unset($_GET['destination']);
  }
  $contact = $form_state['crm_core_contact'];
  $uri = entity_uri('crm_core_contact', $contact);
  $form_state['redirect'] = array(
    $uri['path'] . '/delete',
    array(
      'query' => $destination,
    ),
  );
}