Commit 683f054a authored by Jelle Sebreghts's avatar Jelle Sebreghts
Browse files

Issue #1468868 by saidatom: Added WEBFORM Validation DATA and select.

parent f4a28ac7
......@@ -28,7 +28,7 @@
this.data = Drupal.settings.clientsideValidation;
this.forms = this.data['forms'];
this.validators = {};
this.groups = {}; //this.data['groups'];
this.groups = this.data['groups'];
//disable class and attribute rules
$.validator.classRules = function() {
......@@ -62,7 +62,6 @@
var self = this;
jQuery.each (self.forms, function(f) {
self.groups[f] = {};
var errorel = self.prefix + f + '-errors';
// Remove any existing validation stuff
if (self.validators[f]) {
......
......@@ -141,11 +141,11 @@ function clientside_validation_webform_after_build(&$form, &$form_state) {
function _clientside_validation_add_special_rules(&$js_rules, &$settings, $form) {
if (isset($js_rules['_groups'])) {
$settings['clientsideValidation']['groups'][$form['#id']] = $js_rules['_groups'];
$settings['clientsideValidation']['groups'][$form['#id']] = (object)$js_rules['_groups'];
unset($js_rules['_groups']);
}
else {
$settings['clientsideValidation']['groups'][$form['#id']] = array();
$settings['clientsideValidation']['groups'][$form['#id']] = new stdclass();
}
foreach ($js_rules as $key => $rule) {
if (isset($rule['checkboxgroupminmax'])) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment