You are here

function uc_coupon_delete_confirm in Ubercart Discount Coupons 5

Same name and namespace in other branches
  1. 6 uc_coupon.admin.inc \uc_coupon_delete_confirm()
  2. 7.3 uc_coupon.admin.inc \uc_coupon_delete_confirm()
  3. 7.2 uc_coupon.admin.inc \uc_coupon_delete_confirm()

Delete coupon confirm form

Parameters

$cid int: Coupon ID.

Return value

$confirm Return a drupal confirm form.

1 string reference to 'uc_coupon_delete_confirm'
uc_coupon_menu in ./uc_coupon.module
Implementation of hook_menu().

File

./uc_coupon.module, line 753
Provides discount coupons for Ubercart.

Code

function uc_coupon_delete_confirm($cid) {
  $coupon = uc_coupon_load($cid);
  $form['cid'] = array(
    '#type' => 'value',
    '#value' => $cid,
  );
  return confirm_form($form, t('Are you sure you want to delete coupon %name with code %code?', array(
    '%name' => $coupon->name,
    '%code' => $coupon->code,
  )), 'admin/store/customers/coupon', t('This action cannot be undone. Deleting this coupon will remove all records of past uses as well.'), t('Delete'));
}