function uc_taxes_delete_form in Ubercart 7.3
Same name and namespace in other branches
- 6.2 uc_taxes/uc_taxes.admin.inc \uc_taxes_delete_form()
Deletes a tax rule.
See also
1 string reference to 'uc_taxes_delete_form'
- uc_taxes_menu in uc_taxes/
uc_taxes.module - Implements hook_menu().
File
- uc_taxes/
uc_taxes.admin.inc, line 251 - Taxes administration menu items.
Code
function uc_taxes_delete_form($form, &$form_state, $rate_id) {
// Bail if we got a bad rate ID.
if (!($rate = uc_taxes_rate_load($rate_id))) {
drupal_set_message(t('That tax rate does not exist.'), 'error');
drupal_goto('admin/store/settings/taxes');
}
$form['rate_id'] = array(
'#type' => 'value',
'#value' => $rate_id,
);
$form['name'] = array(
'#type' => 'value',
'#value' => $rate->name,
);
return confirm_form($form, t('Are you sure you want to delete @name?', array(
'@name' => $rate->name,
)), 'admin/store/settings/taxes', t('This action cannot be undone. Any orders that have been charged this tax may lose tax if you proceed.<br />If you just want this tax to no longer be applied to orders, consider disabling its predicate instead.'), t('Delete'), t('Cancel'));
}