You are here

function uc_coupon_delete_confirm_submit in Ubercart Discount Coupons 7.3

Same name and namespace in other branches
  1. 5 uc_coupon.module \uc_coupon_delete_confirm_submit()
  2. 6 uc_coupon.admin.inc \uc_coupon_delete_confirm_submit()
  3. 7.2 uc_coupon.admin.inc \uc_coupon_delete_confirm_submit()

Delete coupon confirm form submit handler.

File

./uc_coupon.admin.inc, line 1032
Discount Coupons administration pages.

Code

function uc_coupon_delete_confirm_submit($form, &$form_state) {
  $coupon = $form['#uc_coupon'];
  uc_coupon_delete($coupon->cid);
  drupal_set_message(t('Coupon %name has been deleted.', array(
    '%name' => $coupon->name,
  )));
  $form_state['redirect'] = 'admin/store/coupons' . ($coupon->status ? '' : '/inactive');
}