You are here

function clientside_validation_add_js_settings in Clientside Validation 7

3 calls to clientside_validation_add_js_settings()
clientside_validation_form_after_build in ./clientside_validation.module
Regular form.
clientside_validation_ife_validator in clientside_validation_ife/clientside_validation_ife.module
clientside_validation_webform_after_build in ./clientside_validation.module
Webform.

File

./clientside_validation.module, line 329
Add client side validation to forms.

Code

function clientside_validation_add_js_settings($settings) {
  $clientside_validation_settings =& drupal_static('clientside_validation_settings', array());
  if (variable_get('clientside_validation_use_minified', 0) == 0) {
    drupal_add_js(drupal_get_path('module', 'clientside_validation') . '/jquery-validate/jquery.validate.js');
  }
  else {
    drupal_add_js(drupal_get_path('module', 'clientside_validation') . '/jquery-validate/jquery.validate.min.js');
  }
  if (variable_get('clientside_validation_add_js_timing', 0)) {

    // @see http://remysharp.com/2007/04/20/performance-profiling-javascript/
    drupal_add_js(drupal_get_path('module', 'clientside_validation') . '/time.js');
  }

  //add our js file to the footer to support vertical_tabs
  drupal_add_js(drupal_get_path('module', 'clientside_validation') . '/clientside_validation.ie8.js', array(
    'scope' => 'footer',
    'weight' => 19,
    'browsers' => array(
      'IE' => 'lt IE 9',
      '!IE' => FALSE,
    ),
  ));
  drupal_add_js(drupal_get_path('module', 'clientside_validation') . '/clientside_validation.js', array(
    'scope' => 'footer',
    'weight' => 20,
  ));
  $clientside_validation_settings = drupal_array_merge_deep($clientside_validation_settings, $settings);
}