comparison app/view/widget/base/CheckBox.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 a031b98c7edc
comparison
equal deleted inserted replaced
633:1e1534482bfd 634:291ac2e2bcf5
54 this.down('checkbox').invalidCls = 'x-lada-warning'; 54 this.down('checkbox').invalidCls = 'x-lada-warning';
55 this.down('checkbox').markInvalid(''); 55 this.down('checkbox').markInvalid('');
56 img.show(); 56 img.show();
57 var fieldset = this.up('fieldset[collapsible=true]'); 57 var fieldset = this.up('fieldset[collapsible=true]');
58 if (fieldset) { 58 if (fieldset) {
59 fieldset.showWarnings(warnings); 59 var i18n = Lada.getApplication().bundle;
60 var warningText = i18n.getMsg(this.name) + ': ' + warnings;
61 fieldset.showWarningOrError(true, warningText);
60 } 62 }
61 }, 63 },
62 64
63 showErrors: function(errors) { 65 showErrors: function(errors) {
64 var img = this.down('image[name=errorImg]'); 66 var img = this.down('image[name=errorImg]');
71 this.down('checkbox').invalidCls = 'x-lada-error'; 73 this.down('checkbox').invalidCls = 'x-lada-error';
72 this.down('checkbox').markInvalid(''); 74 this.down('checkbox').markInvalid('');
73 img.show(); 75 img.show();
74 var fieldset = this.up('fieldset[collapsible=true]'); 76 var fieldset = this.up('fieldset[collapsible=true]');
75 if (fieldset) { 77 if (fieldset) {
76 fieldset.showErrors(); 78 var i18n = Lada.getApplication().bundle;
79 var errorText = i18n.getMsg(this.name) + ': ' + errors;
80 fieldset.showWarningOrError(false, '', true, errorText);
77 } 81 }
78 }, 82 },
79 83
80 clearWarningOrError: function() { 84 clearWarningOrError: function() {
81 this.down('image[name=errorImg]').hide(); 85 this.down('image[name=errorImg]').hide();

http://lada.wald.intevation.org