You are here

function user_badges_delete_form in User Badges 5

Same name and namespace in other branches
  1. 6.2 user_badges.module \user_badges_delete_form()
  2. 6 user_badges.module \user_badges_delete_form()
  3. 7 user_badges.admin.inc \user_badges_delete_form()
  4. 7.2 user_badges.admin.inc \user_badges_delete_form()
  5. 7.3 user_badges.admin.inc \user_badges_delete_form()
1 string reference to 'user_badges_delete_form'
user_badges_menu in ./user_badges.module
Implementation of hook_menu().

File

./user_badges.module, line 693
@brief User Badges module file

Code

function user_badges_delete_form($bid) {
  if ($badge = user_badges_get_badge($bid)) {
    $form = array();
    $form['badge'] = array(
      '#value' => theme('user_badge_group', array(
        theme('user_badge', $badge),
      )),
    );
    $form['bid'] = array(
      '#type' => 'value',
      '#value' => $bid,
    );
    return confirm_form($form, t('Are you sure you want to delete the badge %name?', array(
      '%name' => $badge->name,
    )), 'admin/user/user_badges');
  }
  form_set_error('', t('This badge does not exist.'));
}