You are here

function user_badges_badge_count_form in User Badges 6.2

Same name and namespace in other branches
  1. 6 user_badges.rules.inc \user_badges_badge_count_form()

Configuration form for user_badges_badge_count condition

File

./user_badges.rules.inc, line 157
Provide better integration into the rules module

Code

function user_badges_badge_count_form($settings = array(), &$form) {
  $form['settings']['operation'] = array(
    '#type' => 'select',
    '#title' => t('User\'s number of badges is'),
    '#options' => array(
      'greater' => t('Greater than'),
      'equal' => t('Equal to'),
      'less' => t('Less than'),
    ),
    '#default_value' => isset($settings['operation']) ? $settings['operation'] : 'equal',
  );
  $form['settings']['number']['#weight'] = 2;
}