From 2420746f1b65fde9a2c57d418d86f762426cca7e Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Fri, 16 Sep 2022 21:46:42 +0300 Subject: [PATCH] folders save fix --- .../Espo/Resources/metadata/entityDefs/EmailAccount.json | 1 - .../Espo/Resources/metadata/entityDefs/InboundEmail.json | 1 - client/src/views/email-account/fields/folders.js | 4 ++++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/application/Espo/Resources/metadata/entityDefs/EmailAccount.json b/application/Espo/Resources/metadata/entityDefs/EmailAccount.json index ab62af71d8..0322441f64 100644 --- a/application/Espo/Resources/metadata/entityDefs/EmailAccount.json +++ b/application/Espo/Resources/metadata/entityDefs/EmailAccount.json @@ -44,7 +44,6 @@ "monitoredFolders": { "type": "array", "default": ["INBOX"], - "options": ["INBOX"], "view": "views/email-account/fields/folders", "displayAsList": true, "noEmptyString": true, diff --git a/application/Espo/Resources/metadata/entityDefs/InboundEmail.json b/application/Espo/Resources/metadata/entityDefs/InboundEmail.json index b635135c7f..27f9db7bd9 100644 --- a/application/Espo/Resources/metadata/entityDefs/InboundEmail.json +++ b/application/Espo/Resources/metadata/entityDefs/InboundEmail.json @@ -43,7 +43,6 @@ "monitoredFolders": { "type": "array", "default": ["INBOX"], - "options": ["INBOX"], "view": "views/inbound-email/fields/folders", "displayAsList": true, "noEmptyString": true, diff --git a/client/src/views/email-account/fields/folders.js b/client/src/views/email-account/fields/folders.js index f3b6a0f77d..acdce33db8 100644 --- a/client/src/views/email-account/fields/folders.js +++ b/client/src/views/email-account/fields/folders.js @@ -32,6 +32,10 @@ define('views/email-account/fields/folders', ['views/fields/array'], function (D getFoldersUrl: 'EmailAccount/action/getFolders', + setupOptions: function () { + this.params.options = ['INBOX']; + }, + fetchFolders: function () { return new Promise(resolve => { var data = {