function uc_attribute_option_delete_confirm in Ubercart 6.2
Same name and namespace in other branches
- 5 uc_attribute/uc_attribute.module \uc_attribute_option_delete_confirm()
- 7.3 uc_attribute/uc_attribute.admin.inc \uc_attribute_option_delete_confirm()
Confirms deletion of the given attribute option.
See also
uc_attribute_option_delete_confirm_submit()
1 string reference to 'uc_attribute_option_delete_confirm'
- uc_attribute_menu in uc_attribute/
uc_attribute.module - Implements hook_menu().
File
- uc_attribute/
uc_attribute.admin.inc, line 614 - Attribute administration menu items.
Code
function uc_attribute_option_delete_confirm($form_state, $attribute, $option) {
if (empty($option)) {
drupal_set_message(t('There is no option with that ID.'), 'error');
drupal_goto('admin/store/attributes/' . $attribute->aid . '/options');
}
$aid = $attribute->aid;
$oid = $option->oid;
$form['aid'] = array(
'#type' => 'value',
'#value' => $aid,
);
$form['oid'] = array(
'#type' => 'value',
'#value' => $oid,
);
$output = confirm_form($form, t('Are you sure you want to delete the option %name?', array(
'%name' => $option->name,
)), 'admin/store/attributes/' . $aid . '/options', '', t('Delete'), t('Cancel'));
return $output;
}