From 40042c0ac0222dc4028394a9068749aa69610549 Mon Sep 17 00:00:00 2001 From: TanyaGashtold Date: Tue, 12 Aug 2025 09:58:53 +0000 Subject: [PATCH] $'syncing commit from monorepo. PR: 382, Title: FIO-10419: Fixes an issue where File component will not save Directory setting' --- .../file/editForm/File.edit.file.js | 103 ++++++++++++++---- 1 file changed, 80 insertions(+), 23 deletions(-) diff --git a/src/components/file/editForm/File.edit.file.js b/src/components/file/editForm/File.edit.file.js index d49052c0bc..3fae8aeeb9 100644 --- a/src/components/file/editForm/File.edit.file.js +++ b/src/components/file/editForm/File.edit.file.js @@ -157,29 +157,86 @@ export default [ placeholder: '(optional) Enter a directory for the files', tooltip: 'This will place all the files uploaded in this field in the directory', weight: 20, - conditional: { - json: { - '!==': [{ - var: 'data.storage' - }, 'googledrive'] - } - } - }, - { - type: 'textfield', - input: true, - key: 'dir', - label: 'Folder ID', - placeholder: '(optional) Enter an ID of the folder for the files', - tooltip: 'This will place all the files uploaded in this field in the folder', - weight: 20, - conditional: { - json: { - '===': [{ - var: 'data.storage' - }, 'googledrive'] - } - } + logic: [ + { + name: 'Change To File ID', + trigger: { + type: 'simple', + simple: { + show: true, + conjunction: 'all', + conditions: [ + { + component: 'storage', + operator: 'isEqual', + value: 'googledrive', + }, + ], + }, + }, + actions: [ + { + name: 'Change placeholder', + type: 'property', + property: { + label: 'Placeholder', + value: 'placeholder', + type: 'string', + }, + text: '(optional) Enter an ID of the folder for the files', + }, + { + name: 'Change label', + type: 'property', + property: { + label: 'Label', + value: 'label', + type: 'string', + }, + text: 'Folder ID', + }, + ], + }, + { + name: 'Change to Directory', + trigger: { + type: 'simple', + simple: { + show: true, + conjunction: 'all', + conditions: [ + { + component: 'storage', + operator: 'isNotEqual', + value: 'googledrive', + }, + ], + }, + }, + actions: [ + { + name: 'Change placeholder', + type: 'property', + property: { + label: 'Placeholder', + value: 'placeholder', + type: 'string', + }, + text: '(optional) Enter a directory for the files', + }, + { + name: 'Change label', + type: 'property', + property: { + label: 'Label', + value: 'label', + type: 'string', + }, + text: 'Directory', + }, + ], + }, + ], }, { type: 'textfield',