MDL-49783 forms: Collapsed form section is opened on error
This commit is contained in:
@@ -2229,6 +2229,8 @@ function validate_' . $this->_formName . '_' . $escapedElementName . '(element)
|
||||
ret = validate_' . $this->_formName . '_' . $escapedElementName.'(frm.elements[\''.$elementName.'\']) && ret;
|
||||
if (!ret && !first_focus) {
|
||||
first_focus = true;
|
||||
Y.Global.fire(M.core.globalEvents.FORM_ERROR, {formid: \''. $this->_attributes['id'] .'\',
|
||||
elementid: \'id_error_'.$elementName.'\'});
|
||||
document.getElementById(\'id_error_'.$elementName.'\').focus();
|
||||
}
|
||||
';
|
||||
|
||||
Reference in New Issue
Block a user