Mercurial > lada > lada-client
diff 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 |
line wrap: on
line diff
--- a/app/view/widget/base/CheckBox.js Mon Mar 16 17:23:27 2015 +0100 +++ b/app/view/widget/base/CheckBox.js Mon Mar 16 17:31:13 2015 +0100 @@ -56,7 +56,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); } }, @@ -73,7 +75,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); } },