diff app/view/widget/base/Datetime.js @ 634:291ac2e2bcf5

Set translateable messages for the parent fieldset.
author Raimund Renkert <raimund.renkert@intevation.de>
date Mon, 16 Mar 2015 17:31:13 +0100
parents fead63bb5fb4
children 67963fcb7739
line wrap: on
line diff
--- a/app/view/widget/base/Datetime.js	Mon Mar 16 17:23:27 2015 +0100
+++ b/app/view/widget/base/Datetime.js	Mon Mar 16 17:31:13 2015 +0100
@@ -61,7 +61,9 @@
         img.show();
         var fieldset = this.up('fieldset[collapsible=true]');
         if (fieldset) {
-            fieldset.showWarnings(warnings);
+            var i18n = Lada.getApplication().bundle;
+            var warningText = i18n.getMsg(this.name) + ': ' + warnings;
+            fieldset.showWarningOrError(true, warningText);
         }
     },
 
@@ -78,7 +80,9 @@
         img.show();
         var fieldset = this.up('fieldset[collapsible=true]');
         if (fieldset) {
-            fieldset.showErrors();
+            var i18n = Lada.getApplication().bundle;
+            var errorText = i18n.getMsg(this.name) + ': ' + errors;
+            fieldset.showWarningOrError(false, '', true, errorText);
         }
     },
 

http://lada.wald.intevation.org