From ef27582f081e9f68f24dd0b43a407f0479f84e88 Mon Sep 17 00:00:00 2001 From: Barbara Ramiro Date: Thu, 31 Jan 2013 10:55:18 +0800 Subject: [PATCH 1/2] MDL-35847 - Usability - Adding new warning icons --- pix/i/warning.png | Bin 0 -> 278 bytes pix/i/warning.svg | 15 +++++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 pix/i/warning.png create mode 100644 pix/i/warning.svg diff --git a/pix/i/warning.png b/pix/i/warning.png new file mode 100644 index 0000000000000000000000000000000000000000..fedfa4dfd90705812aa3a0fb7efc9950218c4dcf GIT binary patch literal 278 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5Xc6hothE&{2`t$$4J+o>9>-;BcA~(x1XjUr3&6qZAT7xgI zu-sYBfU^n${7G6c(6rd5U4m@4kx_2CE>O3*wIP0643(OuceRSYCHSyOD5e60shPijG VPu$%7Nge1122WQ%mvv4FO#lbzXLbMp literal 0 HcmV?d00001 diff --git a/pix/i/warning.svg b/pix/i/warning.svg new file mode 100644 index 00000000000..0608f422a8f --- /dev/null +++ b/pix/i/warning.svg @@ -0,0 +1,15 @@ + + + +]> + + + + + From 3246648b4838d7c25d4b8a534354933fbb3220aa Mon Sep 17 00:00:00 2001 From: Jason Fowler Date: Thu, 31 Jan 2013 11:02:49 +0800 Subject: [PATCH 2/2] 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')); }