From f7ffadc76f71ae78e2a1f0248dc712ca283f7386 Mon Sep 17 00:00:00 2001 From: yuri Date: Tue, 16 Feb 2016 10:40:19 +0200 Subject: [PATCH] fix template vars sorting --- frontend/client/src/views/template/fields/variables.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/client/src/views/template/fields/variables.js b/frontend/client/src/views/template/fields/variables.js index 1e7e43ef0e..64fd903391 100644 --- a/frontend/client/src/views/template/fields/variables.js +++ b/frontend/client/src/views/template/fields/variables.js @@ -81,8 +81,10 @@ Espo.define('views/template/fields/variables', 'views/fields/base', function (De attributeList.unshift(''); - this.translatedOptions = (this.getLanguage().data[entityType] || {}).fields || {}; - + this.translatedOptions = {}; + attributeList.forEach(function (item) { + this.translatedOptions[item] = this.translate(item, 'fields', entityType); + }, this); }, afterRender: function () {