From 7844ddf6a3cbaa83749be8f2d425fdadc9e20946 Mon Sep 17 00:00:00 2001 From: bwaidelich Date: Tue, 16 Jun 2020 15:47:24 +0200 Subject: [PATCH 1/3] Require latest 4.x version of neos/form --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 672551b..0407ea5 100644 --- a/composer.json +++ b/composer.json @@ -5,7 +5,7 @@ "license": "GPL-3.0+", "require": { "neos/neos": "^3.1 || ^4.0", - "neos/form": "^4.1" + "neos/form": "^4.3" }, "autoload": { "psr-4": { From 4e6cf76728550e9745ba643819dd69d741e48afc Mon Sep 17 00:00:00 2001 From: bwaidelich Date: Tue, 16 Jun 2020 15:48:11 +0200 Subject: [PATCH 2/3] FEATURE: Allow "multipart" format to be used in EmailFinisher See https://github.com/neos/form/issues/116 --- Configuration/NodeTypes.Finishers.Email.yaml | 3 +++ Resources/Private/Translations/da/NodeTypes/EmailFinisher.xlf | 4 ++++ Resources/Private/Translations/de/NodeTypes/EmailFinisher.xlf | 3 +++ Resources/Private/Translations/en/NodeTypes/EmailFinisher.xlf | 3 +++ 4 files changed, 13 insertions(+) diff --git a/Configuration/NodeTypes.Finishers.Email.yaml b/Configuration/NodeTypes.Finishers.Email.yaml index 62940f1..c7dcc00 100644 --- a/Configuration/NodeTypes.Finishers.Email.yaml +++ b/Configuration/NodeTypes.Finishers.Email.yaml @@ -97,6 +97,9 @@ 'plaintext': label: i18n icon: 'icon-font' + 'multipart': + label: i18n + icon: 'icon-puzzle-piece' 'attachAllPersistentResources': type: boolean ui: diff --git a/Resources/Private/Translations/da/NodeTypes/EmailFinisher.xlf b/Resources/Private/Translations/da/NodeTypes/EmailFinisher.xlf index 989a9ce..0cd8f46 100644 --- a/Resources/Private/Translations/da/NodeTypes/EmailFinisher.xlf +++ b/Resources/Private/Translations/da/NodeTypes/EmailFinisher.xlf @@ -58,6 +58,10 @@ Plaintext Klar tekst + + Multipart + Multipart + Attach all uploaded files Vedhæft alle uploadede filer diff --git a/Resources/Private/Translations/de/NodeTypes/EmailFinisher.xlf b/Resources/Private/Translations/de/NodeTypes/EmailFinisher.xlf index 97b33ef..ccd83f2 100644 --- a/Resources/Private/Translations/de/NodeTypes/EmailFinisher.xlf +++ b/Resources/Private/Translations/de/NodeTypes/EmailFinisher.xlf @@ -44,6 +44,9 @@ Plaintext Klartext + + Multipart + Multipart Attach all uploaded files Alle hochgeladene Dateien anhängen diff --git a/Resources/Private/Translations/en/NodeTypes/EmailFinisher.xlf b/Resources/Private/Translations/en/NodeTypes/EmailFinisher.xlf index 3f1583e..5eacafd 100644 --- a/Resources/Private/Translations/en/NodeTypes/EmailFinisher.xlf +++ b/Resources/Private/Translations/en/NodeTypes/EmailFinisher.xlf @@ -44,6 +44,9 @@ Plaintext + + Multipart + Attach all uploaded files From a0d1a9c14708c134779374a9811e24bed07d4d12 Mon Sep 17 00:00:00 2001 From: bwaidelich Date: Tue, 16 Jun 2020 15:49:58 +0200 Subject: [PATCH 3/3] FEATURE: Allow FileUpload "resourceCollection" to be configured See https://github.com/neos/form/issues/114 --- .../ResourceCollectionsPostprocessor.php | 31 +++++++++++++++++++ .../NodeTypes.FormElements.FileUpload.yaml | 10 ++++++ .../Translations/de/NodeTypes/FileUpload.xlf | 3 ++ .../Translations/en/NodeTypes/FileUpload.xlf | 3 ++ 4 files changed, 47 insertions(+) create mode 100644 Classes/NodeType/ResourceCollectionsPostprocessor.php diff --git a/Classes/NodeType/ResourceCollectionsPostprocessor.php b/Classes/NodeType/ResourceCollectionsPostprocessor.php new file mode 100644 index 0000000..f91b82d --- /dev/null +++ b/Classes/NodeType/ResourceCollectionsPostprocessor.php @@ -0,0 +1,31 @@ +resourceCollectionSettings as $collectionName => $_) { + $resourceCollectionOptions[] = [ + 'value' => $collectionName, + 'label' => $collectionName, + ]; + } + $configuration['properties']['resourceCollection']['ui']['inspector']['editorOptions']['values'] = $resourceCollectionOptions; + } +} diff --git a/Configuration/NodeTypes.FormElements.FileUpload.yaml b/Configuration/NodeTypes.FormElements.FileUpload.yaml index f2ca56a..be4228c 100644 --- a/Configuration/NodeTypes.FormElements.FileUpload.yaml +++ b/Configuration/NodeTypes.FormElements.FileUpload.yaml @@ -2,6 +2,9 @@ superTypes: 'Neos.Form.Builder:FormElement': TRUE 'Neos.Form.Builder:DefaultValueMixin': FALSE + postprocessors: + 'Neos.Form.Builder:ResourceCollectionsPostprocessor': + postprocessor: 'Neos\Form\Builder\NodeType\ResourceCollectionsPostprocessor' ui: label: 'File upload' icon: 'icon-upload' @@ -42,3 +45,10 @@ 'csv': label: '.csv' icon: 'icon-file-text' + 'resourceCollection': + type: string + ui: + label: i18n + inspector: + group: 'formElement' + editor: 'Neos.Neos/Inspector/Editors/SelectBoxEditor' diff --git a/Resources/Private/Translations/de/NodeTypes/FileUpload.xlf b/Resources/Private/Translations/de/NodeTypes/FileUpload.xlf index b475bf5..b78efe3 100644 --- a/Resources/Private/Translations/de/NodeTypes/FileUpload.xlf +++ b/Resources/Private/Translations/de/NodeTypes/FileUpload.xlf @@ -5,6 +5,9 @@ Allowed file types Erlaubte Dateitypen + + Target Resource Collection + Ziel "Resource Collection" diff --git a/Resources/Private/Translations/en/NodeTypes/FileUpload.xlf b/Resources/Private/Translations/en/NodeTypes/FileUpload.xlf index 3a9da01..c3041ae 100644 --- a/Resources/Private/Translations/en/NodeTypes/FileUpload.xlf +++ b/Resources/Private/Translations/en/NodeTypes/FileUpload.xlf @@ -5,6 +5,9 @@ Allowed file types + + Target Resource Collection +