From d0b8a5f887493d1ab23d512864ea4a2668ce6b6b Mon Sep 17 00:00:00 2001 From: Rob Gietema Date: Wed, 30 Oct 2024 21:48:17 +0100 Subject: [PATCH] Add fixed attachment. --- .../locales/de/LC_MESSAGES/volto.po | 5 +++++ .../locales/en/LC_MESSAGES/volto.po | 5 +++++ .../locales/es/LC_MESSAGES/volto.po | 5 +++++ .../locales/eu/LC_MESSAGES/volto.po | 5 +++++ .../locales/fr/LC_MESSAGES/volto.po | 5 +++++ .../locales/it/LC_MESSAGES/volto.po | 5 +++++ .../locales/ja/LC_MESSAGES/volto.po | 5 +++++ .../locales/nl/LC_MESSAGES/volto.po | 5 +++++ .../locales/pt/LC_MESSAGES/volto.po | 5 +++++ .../locales/pt_BR/LC_MESSAGES/volto.po | 5 +++++ .../locales/ro/LC_MESSAGES/volto.po | 5 +++++ .../packages/volto-form-block/locales/volto.pot | 7 ++++++- .../volto-form-block/src/schemaFormBlock/schema.js | 14 +++++++++++++- 13 files changed, 74 insertions(+), 2 deletions(-) diff --git a/frontend/packages/volto-form-block/locales/de/LC_MESSAGES/volto.po b/frontend/packages/volto-form-block/locales/de/LC_MESSAGES/volto.po index 459a787..f25bde3 100644 --- a/frontend/packages/volto-form-block/locales/de/LC_MESSAGES/volto.po +++ b/frontend/packages/volto-form-block/locales/de/LC_MESSAGES/volto.po @@ -386,6 +386,11 @@ msgstr "Feld-ID" msgid "fieldset_mailing" msgstr "E-Mail senden" +#. Default: "Fixed attachment" +#: schemaFormBlock/schema +msgid "fixed_attachment" +msgstr "Fixer Anhang" + #. Default: "Form" #: formSchema msgid "form" diff --git a/frontend/packages/volto-form-block/locales/en/LC_MESSAGES/volto.po b/frontend/packages/volto-form-block/locales/en/LC_MESSAGES/volto.po index a6c46de..387f3c9 100644 --- a/frontend/packages/volto-form-block/locales/en/LC_MESSAGES/volto.po +++ b/frontend/packages/volto-form-block/locales/en/LC_MESSAGES/volto.po @@ -386,6 +386,11 @@ msgstr "Field ID" msgid "fieldset_mailing" msgstr "" +#. Default: "Fixed attachment" +#: schemaFormBlock/schema +msgid "fixed_attachment" +msgstr "" + #. Default: "Form" #: formSchema msgid "form" diff --git a/frontend/packages/volto-form-block/locales/es/LC_MESSAGES/volto.po b/frontend/packages/volto-form-block/locales/es/LC_MESSAGES/volto.po index 5d7130b..721d357 100644 --- a/frontend/packages/volto-form-block/locales/es/LC_MESSAGES/volto.po +++ b/frontend/packages/volto-form-block/locales/es/LC_MESSAGES/volto.po @@ -392,6 +392,11 @@ msgstr "" msgid "fieldset_mailing" msgstr "" +#. Default: "Fixed attachment" +#: schemaFormBlock/schema +msgid "fixed_attachment" +msgstr "" + #. Default: "Form" #: formSchema msgid "form" diff --git a/frontend/packages/volto-form-block/locales/eu/LC_MESSAGES/volto.po b/frontend/packages/volto-form-block/locales/eu/LC_MESSAGES/volto.po index 1048309..07657aa 100644 --- a/frontend/packages/volto-form-block/locales/eu/LC_MESSAGES/volto.po +++ b/frontend/packages/volto-form-block/locales/eu/LC_MESSAGES/volto.po @@ -388,6 +388,11 @@ msgstr "" msgid "fieldset_mailing" msgstr "" +#. Default: "Fixed attachment" +#: schemaFormBlock/schema +msgid "fixed_attachment" +msgstr "" + #. Default: "Form" #: formSchema msgid "form" diff --git a/frontend/packages/volto-form-block/locales/fr/LC_MESSAGES/volto.po b/frontend/packages/volto-form-block/locales/fr/LC_MESSAGES/volto.po index 77fa6ac..7dc3e83 100644 --- a/frontend/packages/volto-form-block/locales/fr/LC_MESSAGES/volto.po +++ b/frontend/packages/volto-form-block/locales/fr/LC_MESSAGES/volto.po @@ -386,6 +386,11 @@ msgstr "" msgid "fieldset_mailing" msgstr "" +#. Default: "Fixed attachment" +#: schemaFormBlock/schema +msgid "fixed_attachment" +msgstr "" + #. Default: "Form" #: formSchema msgid "form" diff --git a/frontend/packages/volto-form-block/locales/it/LC_MESSAGES/volto.po b/frontend/packages/volto-form-block/locales/it/LC_MESSAGES/volto.po index 36c2586..9ded248 100644 --- a/frontend/packages/volto-form-block/locales/it/LC_MESSAGES/volto.po +++ b/frontend/packages/volto-form-block/locales/it/LC_MESSAGES/volto.po @@ -386,6 +386,11 @@ msgstr "Identificativo" msgid "fieldset_mailing" msgstr "" +#. Default: "Fixed attachment" +#: schemaFormBlock/schema +msgid "fixed_attachment" +msgstr "" + #. Default: "Form" #: formSchema msgid "form" diff --git a/frontend/packages/volto-form-block/locales/ja/LC_MESSAGES/volto.po b/frontend/packages/volto-form-block/locales/ja/LC_MESSAGES/volto.po index 3de47de..492407b 100644 --- a/frontend/packages/volto-form-block/locales/ja/LC_MESSAGES/volto.po +++ b/frontend/packages/volto-form-block/locales/ja/LC_MESSAGES/volto.po @@ -386,6 +386,11 @@ msgstr "" msgid "fieldset_mailing" msgstr "" +#. Default: "Fixed attachment" +#: schemaFormBlock/schema +msgid "fixed_attachment" +msgstr "" + #. Default: "Form" #: formSchema msgid "form" diff --git a/frontend/packages/volto-form-block/locales/nl/LC_MESSAGES/volto.po b/frontend/packages/volto-form-block/locales/nl/LC_MESSAGES/volto.po index 6f28115..029a6a2 100644 --- a/frontend/packages/volto-form-block/locales/nl/LC_MESSAGES/volto.po +++ b/frontend/packages/volto-form-block/locales/nl/LC_MESSAGES/volto.po @@ -386,6 +386,11 @@ msgstr "" msgid "fieldset_mailing" msgstr "" +#. Default: "Fixed attachment" +#: schemaFormBlock/schema +msgid "fixed_attachment" +msgstr "" + #. Default: "Form" #: formSchema msgid "form" diff --git a/frontend/packages/volto-form-block/locales/pt/LC_MESSAGES/volto.po b/frontend/packages/volto-form-block/locales/pt/LC_MESSAGES/volto.po index 3de47de..492407b 100644 --- a/frontend/packages/volto-form-block/locales/pt/LC_MESSAGES/volto.po +++ b/frontend/packages/volto-form-block/locales/pt/LC_MESSAGES/volto.po @@ -386,6 +386,11 @@ msgstr "" msgid "fieldset_mailing" msgstr "" +#. Default: "Fixed attachment" +#: schemaFormBlock/schema +msgid "fixed_attachment" +msgstr "" + #. Default: "Form" #: formSchema msgid "form" diff --git a/frontend/packages/volto-form-block/locales/pt_BR/LC_MESSAGES/volto.po b/frontend/packages/volto-form-block/locales/pt_BR/LC_MESSAGES/volto.po index dda12fc..4518c70 100644 --- a/frontend/packages/volto-form-block/locales/pt_BR/LC_MESSAGES/volto.po +++ b/frontend/packages/volto-form-block/locales/pt_BR/LC_MESSAGES/volto.po @@ -392,6 +392,11 @@ msgstr "" msgid "fieldset_mailing" msgstr "" +#. Default: "Fixed attachment" +#: schemaFormBlock/schema +msgid "fixed_attachment" +msgstr "" + #. Default: "Form" #: formSchema msgid "form" diff --git a/frontend/packages/volto-form-block/locales/ro/LC_MESSAGES/volto.po b/frontend/packages/volto-form-block/locales/ro/LC_MESSAGES/volto.po index 3de47de..492407b 100644 --- a/frontend/packages/volto-form-block/locales/ro/LC_MESSAGES/volto.po +++ b/frontend/packages/volto-form-block/locales/ro/LC_MESSAGES/volto.po @@ -386,6 +386,11 @@ msgstr "" msgid "fieldset_mailing" msgstr "" +#. Default: "Fixed attachment" +#: schemaFormBlock/schema +msgid "fixed_attachment" +msgstr "" + #. Default: "Form" #: formSchema msgid "form" diff --git a/frontend/packages/volto-form-block/locales/volto.pot b/frontend/packages/volto-form-block/locales/volto.pot index 6d73799..83b1a25 100644 --- a/frontend/packages/volto-form-block/locales/volto.pot +++ b/frontend/packages/volto-form-block/locales/volto.pot @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: Plone\n" -"POT-Creation-Date: 2024-10-30T18:09:17.004Z\n" +"POT-Creation-Date: 2024-10-30T20:40:37.407Z\n" "Last-Translator: Plone i18n \n" "Language-Team: Plone i18n \n" "Content-Type: text/plain; charset=utf-8\n" @@ -388,6 +388,11 @@ msgstr "" msgid "fieldset_mailing" msgstr "" +#. Default: "Fixed attachment" +#: schemaFormBlock/schema +msgid "fixed_attachment" +msgstr "" + #. Default: "Form" #: formSchema msgid "form" diff --git a/frontend/packages/volto-form-block/src/schemaFormBlock/schema.js b/frontend/packages/volto-form-block/src/schemaFormBlock/schema.js index 9b596dd..f2cd26a 100644 --- a/frontend/packages/volto-form-block/src/schemaFormBlock/schema.js +++ b/frontend/packages/volto-form-block/src/schemaFormBlock/schema.js @@ -186,6 +186,10 @@ const messages = defineMessages({ defaultMessage: 'Send confirmation to the email entered in the following field', }, + fixed_attachment: { + id: 'fixed_attachment', + defaultMessage: 'Fixed attachment', + }, }); const defaultEmptyData = { @@ -234,7 +238,9 @@ export const schemaFormBlockSchema = ({ intl, ...props }) => { title: intl.formatMessage(messages.fieldset_mailing), fields: [ 'send_confirmation', - ...(data?.send_confirmation ? ['confirmation_recipients'] : []), + ...(data?.send_confirmation + ? ['confirmation_recipients', 'fixed_attachment'] + : []), 'send', ...(data?.send ? [ @@ -380,6 +386,12 @@ export const schemaFormBlockSchema = ({ intl, ...props }) => { (property) => [property, data.schema.properties[property].title], ), }, + + fixed_attachment: { + title: intl.formatMessage(messages.fixed_attachment), + type: 'object', + widget: 'file', + }, }, required: conditional_required, };