MDL-35817 login: convert html tag to use html_writer and change <a> tag id to be...
authorRossiani Wijaya <rwijaya@moodle.com>
Thu, 17 Jan 2013 05:01:27 +0000 (13:01 +0800)
committerRossiani Wijaya <rwijaya@moodle.com>
Thu, 17 Jan 2013 05:06:58 +0000 (13:06 +0800)
lib/javascript-static.js
login/index_form.html

index 64f59f4..5d6f4ee 100644 (file)
@@ -817,7 +817,7 @@ 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');
+    var errorlog = Y.one('#loginerrormessage');
 
     if (errorlog) {
         errorlog.focus();
index 9398810..f7557a5 100644 (file)
@@ -30,10 +30,10 @@ if (empty($CFG->xmlstrictheaders) and !empty($CFG->loginpasswordautocomplete)) {
         </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; ?> >