changeset 633:1e1534482bfd

Allow multiple warning- or error-messages in a fieldset.
author Raimund Renkert <raimund.renkert@intevation.de>
date Mon, 16 Mar 2015 17:23:27 +0100
parents fead63bb5fb4
children 291ac2e2bcf5
files app/view/widget/base/FieldSet.js
diffstat 1 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/app/view/widget/base/FieldSet.js	Mon Mar 16 17:09:15 2015 +0100
+++ b/app/view/widget/base/FieldSet.js	Mon Mar 16 17:23:27 2015 +0100
@@ -12,12 +12,22 @@
 
     plainTitle: '',
     origColor: '',
+    errorText: '',
+    warningText: '',
 
     showWarningOrError: function(warning, warningText, error, errorText) {
         var ndx = 0;
         if (this.collapsible === true) {
             ndx = 1;
         }
+        if (this.errorText && this.errorText !== '') {
+            this.errorText += '\n';
+        }
+        this.errorText += errorText;
+        if (this.warningText && this.warningText !== '') {
+            this.warningText += '\n';
+        }
+        this.warningText += warningText;
         this.plainTitle = this.getEl().dom.firstChild
             .firstChild.firstChild
             .children[ndx].innerHTML;

http://lada.wald.intevation.org