You are here

function user_badges_settings_form in User Badges 7.4

Same name and namespace in other branches
  1. 5 user_badges.module \user_badges_settings_form()
  2. 6.2 user_badges.admin.inc \user_badges_settings_form()
  3. 6 user_badges.admin.inc \user_badges_settings_form()
  4. 7 user_badges.admin.inc \user_badges_settings_form()
  5. 7.2 user_badges.admin.inc \user_badges_settings_form()
  6. 7.3 user_badges.admin.inc \user_badges_settings_form()

Form for general module settings.

1 string reference to 'user_badges_settings_form'
user_badges_menu in ./user_badges.module
Implements hook_menu().

File

includes/user_badges.admin.inc, line 254
Contains administrative UI for User Badge.

Code

function user_badges_settings_form($form, &$form_state) {
  $noyes = array(
    t('No'),
    t('Yes'),
  );

  /*$form['user_badges_showblocked'] = array(
      '#type' => 'radios',
      '#options' => $noyes,
      '#title' => t('Only show blocked user badge'),
      '#default_value' => variable_get('user_badges_showblocked', 0),
      '#description' => t('If checked, only the badge associated to blocked users will be shown, overriding other badges the user eventually has as well as any other settings.') . ' ' .
      t('Note that if there is no badge associated to blocked users, no badges will appear.') . ' ' .
      t('This option only acts on blocked users and has no repercussions on active user badges.'),
      '#attributes' => array('class' => array('container-inline')),
    );*/
  $form['user_badges_userweight'] = array(
    '#type' => 'radios',
    '#options' => $noyes,
    '#title' => t('Allow users to reorder badges'),
    '#default_value' => variable_get('user_badges_userweight', 0),
    '#description' => t('If checked, users will have the ability to reweight their badges in their profile, enabling them to set what order their badges display, and also which badges will display if a limit is set above.') . ' ' . t('Note that you can make individual badges exempt from this function, allowing you to force them to the top or bottom of the list by giving them a very high or low weight value.'),
    '#attributes' => array(
      'class' => array(
        'container-inline',
      ),
    ),
  );
  $form['user_badges_selector_type'] = array(
    '#type' => 'select',
    '#options' => array(
      0 => t('drop-down multi-select'),
      1 => t('autocomplete'),
    ),
    '#title' => t('Selector to set a badge'),
    '#default_value' => variable_get('user_badges_selector_type', 1),
    '#description' => t('Select which type of selector to use to set a badge.'),
    '#attributes' => array(
      'class' => array(
        'container-inline',
      ),
    ),
  );
  return system_settings_form($form);
}