deal with virtual fields in recorddisplaypanel
authorMichael Spahn <m.spahn@metaways.de>
Mon, 24 Jul 2017 15:50:48 +0000 (17:50 +0200)
committerMichael Spahn <m.spahn@metaways.de>
Mon, 24 Jul 2017 15:53:48 +0000 (17:53 +0200)
Change-Id: I192a2fa7ef8d404181666f309208d126e37c4389
Reviewed-on: http://gerrit.tine20.com/customers/5298
Reviewed-by: Michael Spahn <m.spahn@metaways.de>
Tested-by: Michael Spahn <m.spahn@metaways.de>
tine20/Tinebase/js/widgets/display/RecordDisplayPanel.js

index 1ff6cfa..066be07 100644 (file)
@@ -138,6 +138,11 @@ Tine.widgets.display.RecordDisplayPanel = Ext.extend(Ext.ux.display.DisplayPanel
                     fieldLabel: this.app.i18n._hidden(fieldDefinition.label || fieldDefinition.fieldName),
                 };
 
+            if (fieldType === 'virtual') {
+                field.fieldLabel = fieldDefinition.config.label;
+                fieldType = fieldDefinition.config.type || 'textfield';
+            }
+
             if (fieldsToExclude.indexOf(fieldDefinition.fieldName) < 0 && ! fieldDefinition.shy) {
                 if (fieldType == 'text') {
                     Ext.apply(field, {