MDL-83750 core_form: Fix deprecated preg_replace in form
This commit is contained in:
+6
-5
@@ -2746,11 +2746,10 @@ require([
|
||||
' . $valFunc . '
|
||||
});
|
||||
';
|
||||
}
|
||||
}
|
||||
// This handles both randomised (MDL-65217) and non-randomised IDs.
|
||||
$errorid = preg_replace('/^id_/', 'id_error_', $elem->_attributes['id']);
|
||||
$validateJS .= '
|
||||
|
||||
// This handles both randomised (MDL-65217) and non-randomised IDs.
|
||||
$errorid = preg_replace('/^id_/', 'id_error_', $elem->_attributes['id']);
|
||||
$validateJS .= '
|
||||
ret = validate_' . $this->_formName . '_' . $escapedElementName.'(frm.elements[\''.$elementName.'\'], \''.$escapedElementName.'\') && ret;
|
||||
if (!ret && !first_focus) {
|
||||
first_focus = true;
|
||||
@@ -2762,6 +2761,8 @@ require([
|
||||
}
|
||||
';
|
||||
|
||||
}
|
||||
}
|
||||
// Fix for bug displaying errors for elements in a group
|
||||
//unset($element);
|
||||
//$element =& $this->getElement($elementName);
|
||||
|
||||
Reference in New Issue
Block a user