Skip to content

Commit 694f2a2

Browse files
committed
Show labels in dropdown options and use translation
1 parent 8ae6a23 commit 694f2a2

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

src/WorkflowGui/Resources/public/js/pimcore/workflow/global_action.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ pimcore.plugin.workflow.global_action = Class.create({
195195
fieldLabel: t('workflow_global_action_to'),
196196
store: this.placesStore,
197197
value: globalAction.get('to'),
198-
displayField: 'id',
198+
displayField: 'label',
199199
valueField: 'id',
200200
multiSelect: true,
201201
queryMode: 'local',

src/WorkflowGui/Resources/public/js/pimcore/workflow/item.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,9 @@ pimcore.plugin.workflow.item = Class.create({
118118
places = Object.keys(places).map(function (objectKey, index) {
119119
var place = places[objectKey];
120120
place['id'] = objectKey;
121+
place['label'] = (place.label && place.label.lenght > 0)
122+
? t(place.label)
123+
: objectKey;
121124

122125
return place;
123126
});
@@ -362,7 +365,7 @@ pimcore.plugin.workflow.item = Class.create({
362365
store: this.placesStore,
363366
name: 'initial_place',
364367
value: this.data.initial_place,
365-
displayField: 'id',
368+
displayField: 'label',
366369
valueField: 'id',
367370
queryMode: 'local'
368371
},

src/WorkflowGui/Resources/public/js/pimcore/workflow/transition.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ pimcore.plugin.workflow.transition = Class.create({
240240
fieldLabel: t('workflow_transition_from'),
241241
store: this.placesStore,
242242
value: transition.get('from'),
243-
displayField: 'id',
243+
displayField: 'label',
244244
valueField: 'id',
245245
multiSelect: true,
246246
queryMode: 'local',
@@ -251,7 +251,7 @@ pimcore.plugin.workflow.transition = Class.create({
251251
fieldLabel: t('workflow_transition_to'),
252252
store: this.placesStore,
253253
value: transition.get('to'),
254-
displayField: 'id',
254+
displayField: 'label',
255255
valueField: 'id',
256256
multiSelect: true,
257257
queryMode: 'local',

0 commit comments

Comments
 (0)