MDL-52826 forms: Move global functions to self-contained
This commit is contained in:
@@ -1061,9 +1061,6 @@ class HTML_QuickForm extends HTML_Common {
|
||||
if (!isset($this->_rules[$element])) {
|
||||
$this->_rules[$element] = array();
|
||||
}
|
||||
if ($validation == 'client') {
|
||||
$this->updateAttributes(array('onsubmit' => 'try { var myValidator = validate_' . $this->_attributes['id'] . '; } catch(e) { return true; } return myValidator(this);'));
|
||||
}
|
||||
$this->_rules[$element][] = array(
|
||||
'type' => $type,
|
||||
'format' => $format,
|
||||
@@ -1132,9 +1129,6 @@ class HTML_QuickForm extends HTML_Common {
|
||||
$this->_required[] = $elementName;
|
||||
$required++;
|
||||
}
|
||||
if ('client' == $validation) {
|
||||
$this->updateAttributes(array('onsubmit' => 'try { var myValidator = validate_' . $this->_attributes['id'] . '; } catch(e) { return true; } return myValidator(this);'));
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($required > 0 && count($groupObj->getElements()) == $required) {
|
||||
@@ -1166,9 +1160,6 @@ class HTML_QuickForm extends HTML_Common {
|
||||
if ($type == 'required') {
|
||||
$this->_required[] = $group;
|
||||
}
|
||||
if ($validation == 'client') {
|
||||
$this->updateAttributes(array('onsubmit' => 'try { var myValidator = validate_' . $this->_attributes['id'] . '; } catch(e) { return true; } return myValidator(this);'));
|
||||
}
|
||||
}
|
||||
} // end func addGroupRule
|
||||
|
||||
|
||||
Reference in New Issue
Block a user