virtual fields are no send to frontend in a different format
authorMichael Spahn <m.spahn@metaways.de>
Mon, 24 Jul 2017 15:11:06 +0000 (17:11 +0200)
committerMichael Spahn <m.spahn@metaways.de>
Mon, 24 Jul 2017 15:19:03 +0000 (17:19 +0200)
Change-Id: I686ad2d8e94f6c6088e9495d192802b61331751f
Reviewed-on: http://gerrit.tine20.com/customers/5295
Reviewed-by: Michael Spahn <m.spahn@metaways.de>
Tested-by: Michael Spahn <m.spahn@metaways.de>
tine20/Tinebase/js/widgets/form/FieldManager.js

index 9e89d65..2e2643b 100644 (file)
@@ -62,6 +62,12 @@ Tine.widgets.form.FieldManager = function() {
                 app = Tine.Tinebase.appMgr.get(appName),
                 i18n = fieldDefinition.useGlobalTranslation ? i18n : app.i18n;
 
+
+            if (fieldType === 'virtual' && fieldDefinition.config) {
+                fieldType = fieldDefinition.config.type || 'textfield';
+                fieldDefinition = fieldDefinition.config;
+            }
+
             field.fieldLabel = i18n._hidden(fieldDefinition.label || fieldDefinition.fieldName);
             field.name = fieldName;
             field.disabled = !! (fieldDefinition.readOnly || fieldDefinition.disabled);