You are here

function _username_check_load_resources in Username originality AJAX check 6

Same name and namespace in other branches
  1. 5 username_check.module \_username_check_load_resources()
  2. 7 username_check.module \_username_check_load_resources()

Load username_check resources.

1 call to _username_check_load_resources()
username_check_form_user_register_alter in ./username_check.module
Implementation of hook_form_$form-id_alter().

File

./username_check.module, line 69
Checks user name availability on registration page.

Code

function _username_check_load_resources($mode) {
  $module_path = drupal_get_path('module', 'username_check');
  drupal_add_css($module_path . '/username_check.css');
  drupal_add_js($module_path . "/username_check_{$mode}.js");
  drupal_add_js(array(
    'usernameCheck' => array(
      'ajaxUrl' => url('username_check/isunique', array(
        'absolute' => TRUE,
      )),
      'msgWait' => t('Checking username availability ...'),
      'delay' => variable_get('username_check_delay', 1),
    ),
  ), 'setting');
}