Skip to content

Commit

Permalink
Add fixed attachment.
Browse files Browse the repository at this point in the history
  • Loading branch information
robgietema committed Oct 30, 2024
1 parent 729dfa1 commit d0b8a5f
Show file tree
Hide file tree
Showing 13 changed files with 74 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,11 @@ msgstr ""
msgid "fieldset_mailing"
msgstr ""

#. Default: "Fixed attachment"
#: schemaFormBlock/schema
msgid "fixed_attachment"
msgstr ""

#. Default: "Form"
#: formSchema
msgid "form"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,11 @@ msgstr ""
msgid "fieldset_mailing"
msgstr ""

#. Default: "Fixed attachment"
#: schemaFormBlock/schema
msgid "fixed_attachment"
msgstr ""

#. Default: "Form"
#: formSchema
msgid "form"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,11 @@ msgstr ""
msgid "fieldset_mailing"
msgstr ""

#. Default: "Fixed attachment"
#: schemaFormBlock/schema
msgid "fixed_attachment"
msgstr ""

#. Default: "Form"
#: formSchema
msgid "form"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,11 @@ msgstr "Identificativo"
msgid "fieldset_mailing"
msgstr ""

#. Default: "Fixed attachment"
#: schemaFormBlock/schema
msgid "fixed_attachment"
msgstr ""

#. Default: "Form"
#: formSchema
msgid "form"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,11 @@ msgstr ""
msgid "fieldset_mailing"
msgstr ""

#. Default: "Fixed attachment"
#: schemaFormBlock/schema
msgid "fixed_attachment"
msgstr ""

#. Default: "Form"
#: formSchema
msgid "form"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,11 @@ msgstr ""
msgid "fieldset_mailing"
msgstr ""

#. Default: "Fixed attachment"
#: schemaFormBlock/schema
msgid "fixed_attachment"
msgstr ""

#. Default: "Form"
#: formSchema
msgid "form"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,11 @@ msgstr ""
msgid "fieldset_mailing"
msgstr ""

#. Default: "Fixed attachment"
#: schemaFormBlock/schema
msgid "fixed_attachment"
msgstr ""

#. Default: "Form"
#: formSchema
msgid "form"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,11 @@ msgstr ""
msgid "fieldset_mailing"
msgstr ""

#. Default: "Fixed attachment"
#: schemaFormBlock/schema
msgid "fixed_attachment"
msgstr ""

#. Default: "Form"
#: formSchema
msgid "form"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,11 @@ msgstr ""
msgid "fieldset_mailing"
msgstr ""

#. Default: "Fixed attachment"
#: schemaFormBlock/schema
msgid "fixed_attachment"
msgstr ""

#. Default: "Form"
#: formSchema
msgid "form"
Expand Down
7 changes: 6 additions & 1 deletion frontend/packages/volto-form-block/locales/volto.pot
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>\n"
"Language-Team: Plone i18n <[email protected]>\n"
"Content-Type: text/plain; charset=utf-8\n"
Expand Down Expand Up @@ -388,6 +388,11 @@ msgstr ""
msgid "fieldset_mailing"
msgstr ""

#. Default: "Fixed attachment"
#: schemaFormBlock/schema
msgid "fixed_attachment"
msgstr ""

#. Default: "Form"
#: formSchema
msgid "form"
Expand Down
14 changes: 13 additions & 1 deletion frontend/packages/volto-form-block/src/schemaFormBlock/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down Expand Up @@ -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
? [
Expand Down Expand Up @@ -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,
};
Expand Down

0 comments on commit d0b8a5f

Please sign in to comment.