You are here

function username_check_settings in Username originality AJAX check 6

Same name and namespace in other branches
  1. 8 username_check.admin.inc \username_check_settings()
  2. 5 username_check.module \username_check_settings()
  3. 7 username_check.admin.inc \username_check_settings()

Menu callback; displays the username_check module settings page.

1 string reference to 'username_check_settings'
username_check_menu in ./username_check.module
Implementation of hook_menu().

File

./username_check.settings.inc, line 11
Admin page callbacks for the username_check module.

Code

function username_check_settings() {
  $form = array();
  $form['username_check_mode'] = array(
    '#type' => 'radios',
    '#title' => t('Checking mode'),
    '#options' => array(
      'auto' => t('Automatic - executes when user leaves username field or upon timer'),
      'manual' => t('Manual - executes upon clicking a button'),
    ),
    '#default_value' => variable_get('username_check_mode', 'auto'),
  );
  $form['username_check_delay'] = array(
    '#type' => 'textfield',
    '#title' => t('Timer threshold'),
    '#description' => t('Threshold in seconds (ex: 0.5, 1). Only for automatic mode.'),
    '#default_value' => variable_get('username_check_delay', 1),
  );
  return system_settings_form($form);
}