Merge branch 'wip-MDL-35847-master' of git://github.com/phalacee/moodle
authorEloy Lafuente (stronk7) <stronk7@moodle.org>
Mon, 4 Feb 2013 23:08:44 +0000 (00:08 +0100)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Mon, 4 Feb 2013 23:08:44 +0000 (00:08 +0100)
lib/outputrenderers.php
pix/i/warning.png [new file with mode: 0644]
pix/i/warning.svg [new file with mode: 0644]

index c5633ba..c0c3a28 100644 (file)
@@ -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'));
     }
 
diff --git a/pix/i/warning.png b/pix/i/warning.png
new file mode 100644 (file)
index 0000000..fedfa4d
Binary files /dev/null and b/pix/i/warning.png differ
diff --git a/pix/i/warning.svg b/pix/i/warning.svg
new file mode 100644 (file)
index 0000000..0608f42
--- /dev/null
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<!-- Generator: Adobe Illustrator 15.1.0, SVG Export Plug-In  -->\r
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [\r
+       <!ENTITY ns_flows "http://ns.adobe.com/Flows/1.0/">\r
+]>\r
+<svg version="1.1"\r
+        xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"\r
+        x="0px" y="0px" width="16px" height="16px" viewBox="0 0 16 16" style="overflow:visible;enable-background:new 0 0 16 16;"\r
+        xml:space="preserve">\r
+<defs>\r
+</defs>\r
+<path style="fill:#999999;" d="M7,0.7L0.2,14.1c-0.5,1,0,1.8,1.1,1.8h13.2c1.1,0,1.6-0.8,1.1-1.8L8.8,0.7C8.3-0.2,7.5-0.2,7,0.7z\r
+        M9.4,13.4c0,0.8-0.7,1.5-1.5,1.5c-0.8,0-1.5-0.7-1.5-1.5c0-0.8,0.7-1.5,1.5-1.5C8.7,11.9,9.4,12.5,9.4,13.4z M9.2,5.9v4\r
+       c0,0.5-0.5,1-1,1H7.6c-0.5,0-1-0.5-1-1v-4c0-0.6,0.5-1,1-1h0.6C8.8,4.9,9.2,5.3,9.2,5.9z"/>\r
+</svg>\r