You are here

function uc_discounts_admin_discount_delete_form in Ubercart Discounts (Alternative) 7.2

Generates an admin form to delete a discount.

See also

uc_discounts_admin_discount_delete_form_submit()

1 string reference to 'uc_discounts_admin_discount_delete_form'
uc_discounts_menu in uc_discounts/uc_discounts.module
Implements hook_menu().

File

uc_discounts/uc_discounts.admin.inc, line 1070
Admin forms and functions for uc_discounts module.

Code

function uc_discounts_admin_discount_delete_form($form, &$form_state, $discount_id) {
  $discount = uc_discounts_load($discount_id);
  $form = array(
    'discount_id' => array(
      '#type' => 'value',
      '#value' => $discount_id,
    ),
  );
  $output = confirm_form($form, t('Delete @row?', array(
    '@row' => $discount->name,
  )), 'admin/store/uc_discounts');
  return $output;
}