You are here

function commerce_customer_customer_profile_delete_form in Commerce Core 7

Form callback: confirmation form for deleting a profile.

Parameters

$profile: The profile object to be deleted.

See also

confirm_form()

1 string reference to 'commerce_customer_customer_profile_delete_form'
commerce_customer_ui_forms in modules/customer/commerce_customer_ui.module
Implements hook_forms().

File

modules/customer/includes/commerce_customer_profile.forms.inc, line 176
Forms for creating / editing and deleting customer profiles.

Code

function commerce_customer_customer_profile_delete_form($form, &$form_state, $profile) {
  $form_state['customer_profile'] = $profile;

  // Ensure this include file is loaded when the form is rebuilt from the cache.
  $form_state['build_info']['files']['form'] = drupal_get_path('module', 'commerce_customer') . '/includes/commerce_customer_profile.forms.inc';
  $form['#submit'][] = 'commerce_customer_customer_profile_delete_form_submit';
  $form = confirm_form($form, t('Are you sure you want to delete this profile?'), '', '<p>' . t('Deleting this profile cannot be undone.') . '</p>', t('Delete'), t('Cancel'), 'confirm');
  return $form;
}