# HG changeset patch # User Torsten Irländer # Date 1370448247 -7200 # Node ID 5c58c0e8936b212cb66b9e7f3d4ceb1ec93cde75 # Parent 7661f09466cc9c566763348c06cdb6324d09e45f Add function which translates the errorcodes returned from the server. diff -r 7661f09466cc -r 5c58c0e8936b app/view/widgets/LadaForm.js --- a/app/view/widgets/LadaForm.js Wed Jun 05 18:03:10 2013 +0200 +++ b/app/view/widgets/LadaForm.js Wed Jun 05 18:04:07 2013 +0200 @@ -86,6 +86,14 @@ onModelLoadFailure: function(record, operation) { this.fireEvent('loadfailure', this, record, operation); + }, + + translateReturnCodes: function(codes) { + var translated = {}; + for (var k in codes) { + translated[k] = Lada.getApplication().bundle.getMsg(codes[k]); + } + return translated; } });