* Set focus on login error message
*/
M.util.focus_login_error = function(Y) {
- var errorlog = Y.one('#errormsg');
+ var errorlog = Y.one('#loginerrormessage');
if (errorlog) {
errorlog.focus();
</div>
<?php
if (!empty($errormsg)) {
- echo '<div class="loginerrors">';
- echo '<a id="errormsg" class="accesshide" href="#">'.$OUTPUT->error_text($errormsg).'</a>';
+ 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; ?> >