Mercurial > lada > lada-client
diff app/view/widget/base/TextField.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 | 40834912929e |
line wrap: on
line diff
--- a/app/view/widget/base/TextField.js Mon Mar 16 17:23:27 2015 +0100 +++ b/app/view/widget/base/TextField.js Mon Mar 16 17:31:13 2015 +0100 @@ -54,7 +54,9 @@ this.down('textfield').markInvalid(''); 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); } }, @@ -71,7 +73,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); } },