This commit is contained in:
@@ -733,7 +733,7 @@ namespace AyaNova.PlugIn.V8
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
private async System.Threading.Tasks.Task<List<string>> ExportCustomFieldSchema(string objectName, string RavenCustomTranslationKeyObjectName=null)
|
private async System.Threading.Tasks.Task<List<string>> ExportCustomFieldSchema(string objectName, string RavenCustomTranslationKeyObjectName = null)
|
||||||
{
|
{
|
||||||
var ret = new List<string>();
|
var ret = new List<string>();
|
||||||
if (RavenCustomTranslationKeyObjectName == null) RavenCustomTranslationKeyObjectName = objectName;//i.e. WidgetCustom1, WidgetCustom2 etc
|
if (RavenCustomTranslationKeyObjectName == null) RavenCustomTranslationKeyObjectName = objectName;//i.e. WidgetCustom1, WidgetCustom2 etc
|
||||||
@@ -757,11 +757,11 @@ namespace AyaNova.PlugIn.V8
|
|||||||
{
|
{
|
||||||
bAtLeastOneFieldIsVisible = true;
|
bAtLeastOneFieldIsVisible = true;
|
||||||
ret.Add(f.FieldName);
|
ret.Add(f.FieldName);
|
||||||
int n=Convert.ToInt32(f.FieldName.Replace("Custom", ""))+1;//raven custom fields are 1 based, v7 are zero based
|
int n = Convert.ToInt32(f.FieldName.Replace("Custom", "")) + 1;//raven custom fields are 1 based, v7 are zero based
|
||||||
CustomFieldLocaleKeys.Add(RavenCustomTranslationKeyObjectName + n.ToString(), util.LocaleText.GetLocalizedText(objectName + ".Label." + f.FieldName));
|
CustomFieldLocaleKeys.Add(RavenCustomTranslationKeyObjectName + n.ToString(), util.LocaleText.GetLocalizedText(objectName + ".Label." + f.FieldName));
|
||||||
|
|
||||||
dynamic dt = new JObject();
|
dynamic dt = new JObject();
|
||||||
dt.fld = RavenCustomTranslationKeyObjectName+"Custom"+n.ToString();
|
dt.fld = RavenCustomTranslationKeyObjectName + "Custom" + n.ToString();
|
||||||
dt.hide = false;
|
dt.hide = false;
|
||||||
dt.required = true;
|
dt.required = true;
|
||||||
switch (f.FieldType)
|
switch (f.FieldType)
|
||||||
@@ -789,10 +789,9 @@ namespace AyaNova.PlugIn.V8
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
dt.type = util.AyaUiFieldDataType.Text;
|
dt.type = util.AyaUiFieldDataType.Text;
|
||||||
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
dt.type = AyaUiFieldDataType.Text;
|
|
||||||
dtemplate.Add(dt);
|
dtemplate.Add(dt);
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -802,10 +801,9 @@ namespace AyaNova.PlugIn.V8
|
|||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
//ok, were here because there *are* custom fields available
|
//ok, were here because there *are* custom fields available
|
||||||
|
var a = await util.GetAsync("FormCustom/" + RavenCustomTranslationKeyObjectName);
|
||||||
|
var ctoken = util.CTokenFromResponse(a);
|
||||||
|
await util.PutAsync("FormCustom/" + RavenCustomTranslationKeyObjectName, d.ToString());
|
||||||
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user