You are here

function uc_attribute_option_delete_confirm in Ubercart 5

Same name and namespace in other branches
  1. 6.2 uc_attribute/uc_attribute.admin.inc \uc_attribute_option_delete_confirm()
  2. 7.3 uc_attribute/uc_attribute.admin.inc \uc_attribute_option_delete_confirm()
1 string reference to 'uc_attribute_option_delete_confirm'
uc_attribute_menu in uc_attribute/uc_attribute.module
Implementation of hook_menu().

File

uc_attribute/uc_attribute.module, line 697

Code

function uc_attribute_option_delete_confirm($aid, $oid) {
  $attribute = uc_attribute_load($aid);
  $option = $attribute->options[$oid];
  if (empty($option)) {
    drupal_set_message(t('There is no option with that ID.'), 'error');
    drupal_goto('admin/store/products/attributes/' . $aid . '/options');
  }
  $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/products/attributes/' . $aid . '/options', '', t('Delete'), t('Cancel'));
  return $output;
}