From 3246648b4838d7c25d4b8a534354933fbb3220aa Mon Sep 17 00:00:00 2001 From: Jason Fowler Date: Thu, 31 Jan 2013 11:02:49 +0800 Subject: [PATCH] MDL-35847 - Accessibility - Adding warning icon to the login error message --- lib/outputrenderers.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/outputrenderers.php b/lib/outputrenderers.php index c5633ba4604..c0c3a28e18e 100644 --- a/lib/outputrenderers.php +++ b/lib/outputrenderers.php @@ -2325,12 +2325,14 @@ EOD; * 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')); }