Skip to content

Commit

Permalink
feat: added use_as_bcc for 'email' field
Browse files Browse the repository at this point in the history
  • Loading branch information
giuliaghisini committed Mar 24, 2022
1 parent 49b62dd commit b46b1fa
Show file tree
Hide file tree
Showing 13 changed files with 166 additions and 29 deletions.
14 changes: 12 additions & 2 deletions locales/de/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -218,12 +218,22 @@ msgid "form_to"
msgstr "Empfänger"

#: fieldSchema
# defaultMessage: undefined
# defaultMessage: Send an email copy to this address
msgid "form_useAsBCC"
msgstr ""

#: fieldSchema
# defaultMessage: If selected, a copy of email will be sent to this address.
msgid "form_useAsBCC_description"
msgstr ""

#: fieldSchema
# defaultMessage: Use as 'reply to'
msgid "form_useAsReplyTo"
msgstr "undefiniert"

#: fieldSchema
# defaultMessage: undefined
# defaultMessage: If selected, this will be the address the receiver can use to reply.
msgid "form_useAsReplyTo_description"
msgstr "undefiniert"

Expand Down
14 changes: 12 additions & 2 deletions locales/en/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -218,12 +218,22 @@ msgid "form_to"
msgstr "Recipients"

#: fieldSchema
# defaultMessage: undefined
# defaultMessage: Send an email copy to this address
msgid "form_useAsBCC"
msgstr ""

#: fieldSchema
# defaultMessage: If selected, a copy of email will be sent to this address.
msgid "form_useAsBCC_description"
msgstr ""

#: fieldSchema
# defaultMessage: Use as 'reply to'
msgid "form_useAsReplyTo"
msgstr "Use as 'reply to'"

#: fieldSchema
# defaultMessage: undefined
# defaultMessage: If selected, this will be the address the receiver can use to reply.
msgid "form_useAsReplyTo_description"
msgstr "If selected, this will be the address the receiver can use to reply."

Expand Down
14 changes: 12 additions & 2 deletions locales/es/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -220,12 +220,22 @@ msgid "form_to"
msgstr "Receptores"

#: fieldSchema
# defaultMessage: undefined
# defaultMessage: Send an email copy to this address
msgid "form_useAsBCC"
msgstr ""

#: fieldSchema
# defaultMessage: If selected, a copy of email will be sent to this address.
msgid "form_useAsBCC_description"
msgstr ""

#: fieldSchema
# defaultMessage: Use as 'reply to'
msgid "form_useAsReplyTo"
msgstr "Utilizar como 'Responder a'"

#: fieldSchema
# defaultMessage: undefined
# defaultMessage: If selected, this will be the address the receiver can use to reply.
msgid "form_useAsReplyTo_description"
msgstr "Si está seleccionado el valor de este campo se utilizará como cabecera 'Responder A' en el correo electrónico enviado al receptor"

Expand Down
14 changes: 12 additions & 2 deletions locales/eu/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -220,12 +220,22 @@ msgid "form_to"
msgstr "Jasotzaileak"

#: fieldSchema
# defaultMessage: undefined
# defaultMessage: Send an email copy to this address
msgid "form_useAsBCC"
msgstr ""

#: fieldSchema
# defaultMessage: If selected, a copy of email will be sent to this address.
msgid "form_useAsBCC_description"
msgstr ""

#: fieldSchema
# defaultMessage: Use as 'reply to'
msgid "form_useAsReplyTo"
msgstr "Nori erantzun gisa erabili"

#: fieldSchema
# defaultMessage: undefined
# defaultMessage: If selected, this will be the address the receiver can use to reply.
msgid "form_useAsReplyTo_description"
msgstr "Aukeratuz gero jasotako posta elektronikoari "Erantzun" eginez gero eremu honetan adierazitako helbidera joango da erantzuna"

Expand Down
14 changes: 12 additions & 2 deletions locales/fr/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -218,12 +218,22 @@ msgid "form_to"
msgstr "Bénéficiaires"

#: fieldSchema
# defaultMessage: undefined
# defaultMessage: Send an email copy to this address
msgid "form_useAsBCC"
msgstr ""

#: fieldSchema
# defaultMessage: If selected, a copy of email will be sent to this address.
msgid "form_useAsBCC_description"
msgstr ""

#: fieldSchema
# defaultMessage: Use as 'reply to'
msgid "form_useAsReplyTo"
msgstr ""

#: fieldSchema
# defaultMessage: undefined
# defaultMessage: If selected, this will be the address the receiver can use to reply.
msgid "form_useAsReplyTo_description"
msgstr ""

Expand Down
18 changes: 14 additions & 4 deletions locales/it/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ msgstr "Descrizione"
#: formSchema
# defaultMessage: Form
msgid "form"
msgstr ""
msgstr "Form"

#: components/View
# defaultMessage: Form successfully submitted
Expand All @@ -49,7 +49,7 @@ msgstr "Form invato correttamente"
#: formSchema
# defaultMessage: Attached file will be sent via email, but not stored
msgid "form_attachment_send_email_info_text"
msgstr ""
msgstr "Il file allegato sarà inviato via email, ma non verrà salvato"

#: components/Sidebar
# defaultMessage: Clear data
Expand Down Expand Up @@ -218,12 +218,22 @@ msgid "form_to"
msgstr "Destinatari"

#: fieldSchema
# defaultMessage: undefined
# defaultMessage: Send an email copy to this address
msgid "form_useAsBCC"
msgstr "Invia una copia dell'email a questo indirizzo"

#: fieldSchema
# defaultMessage: If selected, a copy of email will be sent to this address.
msgid "form_useAsBCC_description"
msgstr "Se selezionato, una copia dell'email verrà inviata anche a questo indirizzo."

#: fieldSchema
# defaultMessage: Use as 'reply to'
msgid "form_useAsReplyTo"
msgstr "Usa come 'reply to'"

#: fieldSchema
# defaultMessage: undefined
# defaultMessage: If selected, this will be the address the receiver can use to reply.
msgid "form_useAsReplyTo_description"
msgstr "Se selezionato, questo sarà l'indirizzo a cui il destinatario potrà rispondere."

Expand Down
14 changes: 12 additions & 2 deletions locales/ja/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -218,12 +218,22 @@ msgid "form_to"
msgstr ""

#: fieldSchema
# defaultMessage: undefined
# defaultMessage: Send an email copy to this address
msgid "form_useAsBCC"
msgstr ""

#: fieldSchema
# defaultMessage: If selected, a copy of email will be sent to this address.
msgid "form_useAsBCC_description"
msgstr ""

#: fieldSchema
# defaultMessage: Use as 'reply to'
msgid "form_useAsReplyTo"
msgstr ""

#: fieldSchema
# defaultMessage: undefined
# defaultMessage: If selected, this will be the address the receiver can use to reply.
msgid "form_useAsReplyTo_description"
msgstr ""

Expand Down
14 changes: 12 additions & 2 deletions locales/nl/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -218,12 +218,22 @@ msgid "form_to"
msgstr ""

#: fieldSchema
# defaultMessage: undefined
# defaultMessage: Send an email copy to this address
msgid "form_useAsBCC"
msgstr ""

#: fieldSchema
# defaultMessage: If selected, a copy of email will be sent to this address.
msgid "form_useAsBCC_description"
msgstr ""

#: fieldSchema
# defaultMessage: Use as 'reply to'
msgid "form_useAsReplyTo"
msgstr ""

#: fieldSchema
# defaultMessage: undefined
# defaultMessage: If selected, this will be the address the receiver can use to reply.
msgid "form_useAsReplyTo_description"
msgstr ""

Expand Down
14 changes: 12 additions & 2 deletions locales/pt/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -218,12 +218,22 @@ msgid "form_to"
msgstr ""

#: fieldSchema
# defaultMessage: undefined
# defaultMessage: Send an email copy to this address
msgid "form_useAsBCC"
msgstr ""

#: fieldSchema
# defaultMessage: If selected, a copy of email will be sent to this address.
msgid "form_useAsBCC_description"
msgstr ""

#: fieldSchema
# defaultMessage: Use as 'reply to'
msgid "form_useAsReplyTo"
msgstr ""

#: fieldSchema
# defaultMessage: undefined
# defaultMessage: If selected, this will be the address the receiver can use to reply.
msgid "form_useAsReplyTo_description"
msgstr ""

Expand Down
14 changes: 12 additions & 2 deletions locales/pt_BR/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -224,12 +224,22 @@ msgid "form_to"
msgstr "Destinatários"

#: fieldSchema
# defaultMessage: undefined
# defaultMessage: Send an email copy to this address
msgid "form_useAsBCC"
msgstr ""

#: fieldSchema
# defaultMessage: If selected, a copy of email will be sent to this address.
msgid "form_useAsBCC_description"
msgstr ""

#: fieldSchema
# defaultMessage: Use as 'reply to'
msgid "form_useAsReplyTo"
msgstr "Utilizar como 'responder para'"

#: fieldSchema
# defaultMessage: undefined
# defaultMessage: If selected, this will be the address the receiver can use to reply.
msgid "form_useAsReplyTo_description"
msgstr "Usar este campo como valor do cabeçalho de 'responder para'"

Expand Down
14 changes: 12 additions & 2 deletions locales/ro/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -218,12 +218,22 @@ msgid "form_to"
msgstr ""

#: fieldSchema
# defaultMessage: undefined
# defaultMessage: Send an email copy to this address
msgid "form_useAsBCC"
msgstr ""

#: fieldSchema
# defaultMessage: If selected, a copy of email will be sent to this address.
msgid "form_useAsBCC_description"
msgstr ""

#: fieldSchema
# defaultMessage: Use as 'reply to'
msgid "form_useAsReplyTo"
msgstr ""

#: fieldSchema
# defaultMessage: undefined
# defaultMessage: If selected, this will be the address the receiver can use to reply.
msgid "form_useAsReplyTo_description"
msgstr ""

Expand Down
16 changes: 13 additions & 3 deletions 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: 2022-01-17T15:37:37.006Z\n"
"POT-Creation-Date: 2022-03-24T09:14:19.679Z\n"
"Last-Translator: Plone i18n <plone-i18n@lists.sourceforge.net>\n"
"Language-Team: Plone i18n <plone-i18n@lists.sourceforge.net>\n"
"MIME-Version: 1.0\n"
Expand Down Expand Up @@ -220,12 +220,22 @@ msgid "form_to"
msgstr ""

#: fieldSchema
# defaultMessage: undefined
# defaultMessage: Send an email copy to this address
msgid "form_useAsBCC"
msgstr ""

#: fieldSchema
# defaultMessage: If selected, a copy of email will be sent to this address.
msgid "form_useAsBCC_description"
msgstr ""

#: fieldSchema
# defaultMessage: Use as 'reply to'
msgid "form_useAsReplyTo"
msgstr ""

#: fieldSchema
# defaultMessage: undefined
# defaultMessage: If selected, this will be the address the receiver can use to reply.
msgid "form_useAsReplyTo_description"
msgstr ""

Expand Down
21 changes: 19 additions & 2 deletions src/fieldSchema.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,22 @@ const messages = defineMessages({
},
useAsReplyTo: {
id: 'form_useAsReplyTo',
defineMessages: "Use as 'reply to'",
defaultMessage: "Use as 'reply to'",
},
useAsReplyTo_description: {
id: 'form_useAsReplyTo_description',
defineMessages:
defaultMessage:
'If selected, this will be the address the receiver can use to reply.',
},
useAsBCC: {
id: 'form_useAsBCC',
defaultMessage: 'Send an email copy to this address',
},
useAsBCC_description: {
id: 'form_useAsBCC_description',
defaultMessage:
'If selected, a copy of email will alse be sent to this address.',
},
});

export default (props) => {
Expand Down Expand Up @@ -111,6 +120,7 @@ export default (props) => {
? ['input_values']
: [];
var useAsReplyTo = props?.field_type === 'from' ? ['use_as_reply_to'] : [];
var useAsBCC = props?.field_type === 'from' ? ['use_as_bcc'] : [];
return {
title: props?.label || '',
fieldsets: [
Expand All @@ -123,6 +133,7 @@ export default (props) => {
'field_type',
...fieldTypeChoices,
...useAsReplyTo,
...useAsBCC,
'required',
],
},
Expand Down Expand Up @@ -157,6 +168,12 @@ export default (props) => {
type: 'boolean',
default: false,
},
use_as_bcc: {
title: intl.formatMessage(messages.useAsBCC),
description: intl.formatMessage(messages.useAsBCC_description),
type: 'boolean',
default: false,
},
required: {
title: intl.formatMessage(messages.field_required),
type: 'boolean',
Expand Down

0 comments on commit b46b1fa

Please sign in to comment.