mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 20:50:21 +01:00
Merge branch 'MDL-35817' of git://github.com/rwijaya/moodle
This commit is contained in:
commit
11a5fab670
@ -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('#loginerrormessage');
|
||||
|
||||
if (errorlog) {
|
||||
errorlog.focus();
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Adds lightbox hidden element that covers the whole node.
|
||||
*
|
||||
|
@ -341,7 +341,9 @@ if (isloggedin() and !isguestuser()) {
|
||||
echo $OUTPUT->box_end();
|
||||
} else {
|
||||
include("index_form.html");
|
||||
if (!empty($CFG->loginpageautofocus)) {
|
||||
if ($errormsg) {
|
||||
$PAGE->requires->js_init_call('M.util.focus_login_error', null, true);
|
||||
} else if (!empty($CFG->loginpageautofocus)) {
|
||||
//focus username or password
|
||||
$PAGE->requires->js_init_call('M.util.focus_login_form', null, true);
|
||||
}
|
||||
|
@ -30,9 +30,10 @@ if (!empty($CFG->loginpasswordautocomplete)) {
|
||||
</div>
|
||||
<?php
|
||||
if (!empty($errormsg)) {
|
||||
echo '<div class="loginerrors">';
|
||||
echo html_writer::start_tag('div', array('class' => 'loginerrors'));
|
||||
echo html_writer::link('#', $errormsg, array('id' => 'loginerrormessage', 'class' => 'accesshide'));
|
||||
echo $OUTPUT->error_text($errormsg);
|
||||
echo '</div>';
|
||||
echo html_writer::end_tag('div');
|
||||
}
|
||||
?>
|
||||
<form action="<?php echo $CFG->httpswwwroot; ?>/login/index.php" method="post" id="login" <?php echo $autocomplete; ?> >
|
||||
|
Loading…
x
Reference in New Issue
Block a user