You are here

function commerce_pricelist_list_edit_delete in Commerce Pricelist 7

Form deletion handler.

@todo: 'Are you sure?' message.

1 string reference to 'commerce_pricelist_list_edit_delete'
commerce_pricelist_list_form in includes/commerce_pricelist.admin.inc
Form function to create an commerce_pricelist_list entity.

File

includes/commerce_pricelist.admin.inc, line 163
Summary

Code

function commerce_pricelist_list_edit_delete($form, &$form_state) {
  $entity = $form_state['values']['entity'];
  commerce_pricelist_list_delete($entity->list_id);
  drupal_set_message(t('The entity %item_title (ID %id) has been deleted', array(
    '%item_title' => $entity->title,
    '%id' => $entity->list_id,
  )));
  $form_state['redirect'] = 'admin/commerce/pricelist/commerce_pricelist_list';
}