function uc_discounts_admin_discount_delete_form_submit in Ubercart Discounts (Alternative) 7.2
Submit handler for uc_discounts_admin_discount_delete_form().
See also
uc_discounts_admin_discount_delete_form()
File
- uc_discounts/
uc_discounts.admin.inc, line 1088 - Admin forms and functions for uc_discounts module.
Code
function uc_discounts_admin_discount_delete_form_submit($form, &$form_state) {
if ($form_state['values']['confirm']) {
$discount = uc_discounts_load($form_state['values']['discount_id']);
uc_discounts_delete_all($discount);
drupal_set_message(t('Discount deleted.'));
}
$form_state['redirect'] = 'admin/store/uc_discounts';
}