comparison 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
comparison
equal deleted inserted replaced
633:1e1534482bfd 634:291ac2e2bcf5
59 this.down('datetimefield').invalidCls = 'x-lada-warning'; 59 this.down('datetimefield').invalidCls = 'x-lada-warning';
60 this.down('datetimefield').markInvalid(''); 60 this.down('datetimefield').markInvalid('');
61 img.show(); 61 img.show();
62 var fieldset = this.up('fieldset[collapsible=true]'); 62 var fieldset = this.up('fieldset[collapsible=true]');
63 if (fieldset) { 63 if (fieldset) {
64 fieldset.showWarnings(warnings); 64 var i18n = Lada.getApplication().bundle;
65 var warningText = i18n.getMsg(this.name) + ': ' + warnings;
66 fieldset.showWarningOrError(true, warningText);
65 } 67 }
66 }, 68 },
67 69
68 showErrors: function(errors) { 70 showErrors: function(errors) {
69 var img = this.down('image[name=errorImg]'); 71 var img = this.down('image[name=errorImg]');
76 this.down('datetimefield').invalidCls = 'x-lada-error'; 78 this.down('datetimefield').invalidCls = 'x-lada-error';
77 this.down('datetimefield').markInvalid(''); 79 this.down('datetimefield').markInvalid('');
78 img.show(); 80 img.show();
79 var fieldset = this.up('fieldset[collapsible=true]'); 81 var fieldset = this.up('fieldset[collapsible=true]');
80 if (fieldset) { 82 if (fieldset) {
81 fieldset.showErrors(); 83 var i18n = Lada.getApplication().bundle;
84 var errorText = i18n.getMsg(this.name) + ': ' + errors;
85 fieldset.showWarningOrError(false, '', true, errorText);
82 } 86 }
83 }, 87 },
84 88
85 clearWarningOrError: function() { 89 clearWarningOrError: function() {
86 this.down('image[name=errorImg]').hide(); 90 this.down('image[name=errorImg]').hide();

http://lada.wald.intevation.org