function user_badges_remove_badge_action_form in User Badges 7.2
Same name and namespace in other branches
- 6.2 user_badges.module \user_badges_remove_badge_action_form()
- 6 user_badges.module \user_badges_remove_badge_action_form()
- 7.4 user_badges.actions.inc \user_badges_remove_badge_action_form()
- 7 user_badges.actions.inc \user_badges_remove_badge_action_form()
- 7.3 user_badges.actions.inc \user_badges_remove_badge_action_form()
@todo Please document this function.
See also
File
- ./
user_badges.actions.inc, line 126 - Actions for User Badges module.
Code
function user_badges_remove_badge_action_form($context) {
$form['badges'] = array(
'#tree' => TRUE,
);
$badges = user_badges_get_badges('all');
$context['badges'] = is_array($context['badges']) ? $context['badges'] : array();
foreach ($badges as $badge) {
$form['badges'][$badge->bid] = array(
'#type' => 'checkbox',
'#title' => theme('user_badge', array(
'badge' => $badge,
)),
'#return_value' => 1,
'#default_value' => $context['badges'][$badge->bid],
'#description' => check_plain($badge->name),
);
}
return $form;
}