mirror of
https://github.com/moodle/moodle.git
synced 2025-08-08 10:26:40 +02:00
Merge branch 'MDL-57488-master' of git://github.com/danpoltawski/moodle
This commit is contained in:
commit
d7cee87d24
4 changed files with 26 additions and 42 deletions
|
@ -216,20 +216,21 @@
|
|||
</div>
|
||||
{{/hasinstructions}}
|
||||
|
||||
|
||||
{{#js}}
|
||||
require(['jquery', 'core/yui'], function($, Y) {
|
||||
{{#error}}
|
||||
$(function() {
|
||||
M.util.focus_login_error(Y);
|
||||
require(['jquery'], function($) {
|
||||
$('#loginerrormessage').focus();
|
||||
});
|
||||
{{/error}}
|
||||
{{^error}}
|
||||
{{#autofocusform}}
|
||||
$(function() {
|
||||
M.util.focus_login_form(Y);
|
||||
require(['jquery'], function($) {
|
||||
if ($('#username').val()) {
|
||||
$('#password').focus();
|
||||
} else {
|
||||
$('#username').focus();
|
||||
}
|
||||
});
|
||||
{{/autofocusform}}
|
||||
{{/error}}
|
||||
})
|
||||
{{/js}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue