MDL-35817 Login: set page focus to error message for login error

This commit is contained in:
Rossiani Wijaya
2013-01-15 15:45:15 +08:00
parent ca48fe5f97
commit c316c3944e
3 changed files with 14 additions and 1 deletions

View File

@@ -854,6 +854,16 @@ M.util.focus_login_form = function(Y) {
}
}
/**
* Set focus on login error message
*/
M.util.focus_login_error = function(Y) {
var errorlog = Y.one('#errormsg');
if (errorlog) {
errorlog.focus();
}
}
/**
* Adds lightbox hidden element that covers the whole node.
*