Skip to content

Commit

Permalink
Default AddressSourceAdapter should show translated class names in co…
Browse files Browse the repository at this point in the history
…mbo box (#45)
  • Loading branch information
blankse authored Mar 4, 2024
1 parent 93a8ede commit 16d70a9
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions public/js/document/newsletters/addressSourceAdapters/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ pimcore.bundle.newsletter.document.newsletters.addressSourceAdapters.default = C
defaults: {labelWidth: 200},
items: [
{
xtype: "combo",
name: "class",
fieldLabel: t("class"),
xtype: 'combo',
name: 'class',
fieldLabel: t('class'),
triggerAction: 'all',
editable: false,
store: new Ext.data.Store({
Expand All @@ -60,10 +60,19 @@ pimcore.bundle.newsletter.document.newsletters.addressSourceAdapters.default = C
rootProperty: 'data'
}
},
fields: ["name"]
fields: [
'name',
{
name: 'translatedName',
convert: function(v, rec){
return t(rec.data.name);
},
depends : ['name']
}
]
}),
width: 600,
displayField: 'name',
displayField: 'translatedName',
valueField: 'name'
},{
xtype: "textfield",
Expand Down

0 comments on commit 16d70a9

Please sign in to comment.