You are here

function commerce_addressbook_profile_options_delete_form in Commerce Addressbook 7.2

Same name and namespace in other branches
  1. 7.3 includes/commerce_addressbook.user.inc \commerce_addressbook_profile_options_delete_form()

Page callback for deleting a customer profile.

See also

confirm_form()

commerce_addressbook_profile_options_delete_form_submit()

1 string reference to 'commerce_addressbook_profile_options_delete_form'
commerce_addressbook_menu in ./commerce_addressbook.module
Implements hook_menu().

File

includes/commerce_addressbook.user.inc, line 71
Page callbacks and form callbacks for user addressbook pages.

Code

function commerce_addressbook_profile_options_delete_form($form, &$form_state, $account, $customer_profile) {

  // Add the breadcrumb for the form's location.
  commerce_addressbook_set_breadcrumb($account, $customer_profile->type);
  $form_state['profile'] = $customer_profile;
  $content = entity_view('commerce_customer_profile', array(
    $customer_profile->profile_id => $customer_profile,
  ));
  $form = confirm_form($form, t('Are you sure you want to delete this address?'), 'user/' . $customer_profile->uid . '/addressbook/' . $customer_profile->type, drupal_render($content) . '<p>' . t('Deleting this address cannot be undone.') . '</p>', t('Delete'), t('Cancel'), 'confirm');
  return $form;
}