You are here

function uc_coupon_delete_confirm_submit in Ubercart Discount Coupons 7.2

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.3 uc_coupon.admin.inc \uc_coupon_delete_confirm_submit()

Delete coupon confirm form submit handler.

File

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

Code

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