Skip to content

Commit

Permalink
MDL-35847 - Accessibility - Adding warning icon to the login error me…
Browse files Browse the repository at this point in the history
…ssage
  • Loading branch information
jsnfwlr committed Feb 4, 2013
1 parent ef27582 commit 3246648
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/outputrenderers.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'));
}

Expand Down

0 comments on commit 3246648

Please sign in to comment.