mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 04:22:07 +02:00
MDL-35847 - Accessibility - Adding warning icon to the login error message
This commit is contained in:
parent
ef27582f08
commit
3246648b48
@ -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'));
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user