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',