Permalink
Browse files

MDL-35847 - Accessibility - Adding warning icon to the login error me…

…ssage
  • Loading branch information...
1 parent ef27582 commit 3246648b4838d7c25d4b8a534354933fbb3220aa @jsnfwlr jsnfwlr committed Jan 31, 2013
Showing with 2 additions and 0 deletions.
  1. +2 −0 lib/outputrenderers.php
View
2 lib/outputrenderers.php
@@ -2325,12 +2325,14 @@ public function close_window_button($text='') {
* If the error message is blank, nothing is output.
*
* @param string $message the error message.
+ * @param bool $icon display the icon along with the error message.
* @return string the HTML to output.
*/
public function error_text($message) {
if (empty($message)) {
return '';
}
+ $message = $this->pix_icon('i/warning', get_string('error'), '', array('class' => 'icon icon-pre', 'title'=>'')) . $message;
return html_writer::tag('span', $message, array('class' => 'error'));
}

0 comments on commit 3246648

Please sign in to comment.