Skip to content

Commit

Permalink
feat: added header and footer mail fields (#105)
Browse files Browse the repository at this point in the history
* feat: added header and footer mail fields

* fix: fixed italian locales labels

* fix: fixed de locales
  • Loading branch information
SaraBianchi authored Jun 20, 2024
1 parent 4a3c213 commit d74cf6c
Show file tree
Hide file tree
Showing 13 changed files with 207 additions and 3 deletions.
15 changes: 15 additions & 0 deletions locales/de/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,21 @@ msgstr "Fehlerhafte E-Mail-Adresse"
msgid "formblock_requiredFieldMessage"
msgstr "Bitte füllen Sie dieses Feld aus"

#: formSchema
# defaultMessage: Text at the end of the email
msgid "mail_footer_label"
msgstr ""

#: formSchema
# defaultMessage: If field isn't filled in, a default text will be used
msgid "mail_header_description"
msgstr ""

#: formSchema
# defaultMessage: Text at the beginning of the email
msgid "mail_header_label"
msgstr ""

#: components/Sidebar
# defaultMessage: remove expired data
msgid "remove_data_button"
Expand Down
15 changes: 15 additions & 0 deletions locales/en/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,21 @@ msgstr ""
msgid "formblock_requiredFieldMessage"
msgstr ""

#: formSchema
# defaultMessage: Text at the end of the email
msgid "mail_footer_label"
msgstr ""

#: formSchema
# defaultMessage: If field isn't filled in, a default text will be used
msgid "mail_header_description"
msgstr ""

#: formSchema
# defaultMessage: Text at the beginning of the email
msgid "mail_header_label"
msgstr ""

#: components/Sidebar
# defaultMessage: remove expired data
msgid "remove_data_button"
Expand Down
15 changes: 15 additions & 0 deletions locales/es/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -558,6 +558,21 @@ msgstr "El correo electrónico es incorrecto."
msgid "formblock_requiredFieldMessage"
msgstr "Rellena este campo"

#: formSchema
# defaultMessage: Text at the end of the email
msgid "mail_footer_label"
msgstr ""

#: formSchema
# defaultMessage: If field isn't filled in, a default text will be used
msgid "mail_header_description"
msgstr ""

#: formSchema
# defaultMessage: Text at the beginning of the email
msgid "mail_header_label"
msgstr ""

#: components/Sidebar
# defaultMessage: remove expired data
msgid "remove_data_button"
Expand Down
15 changes: 15 additions & 0 deletions locales/eu/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,21 @@ msgstr "Posta elektronikoa okerra da"
msgid "formblock_requiredFieldMessage"
msgstr "Bete eremua"

#: formSchema
# defaultMessage: Text at the end of the email
msgid "mail_footer_label"
msgstr ""

#: formSchema
# defaultMessage: If field isn't filled in, a default text will be used
msgid "mail_header_description"
msgstr ""

#: formSchema
# defaultMessage: Text at the beginning of the email
msgid "mail_header_label"
msgstr ""

#: components/Sidebar
# defaultMessage: remove expired data
msgid "remove_data_button"
Expand Down
15 changes: 15 additions & 0 deletions locales/fr/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,21 @@ msgstr ""
msgid "formblock_requiredFieldMessage"
msgstr ""

#: formSchema
# defaultMessage: Text at the end of the email
msgid "mail_footer_label"
msgstr ""

#: formSchema
# defaultMessage: If field isn't filled in, a default text will be used
msgid "mail_header_description"
msgstr ""

#: formSchema
# defaultMessage: Text at the beginning of the email
msgid "mail_header_label"
msgstr ""

#: components/Sidebar
# defaultMessage: remove expired data
msgid "remove_data_button"
Expand Down
19 changes: 17 additions & 2 deletions locales/it/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ msgstr "Mittente di default"
#: formSchema
# defaultMessage: Mail subject
msgid "form_default_subject"
msgstr "Oggetto della mail"
msgstr "Oggetto dell'email"

#: components/Edit
#: components/FormView
Expand Down Expand Up @@ -321,7 +321,7 @@ msgstr "Attenzione!"
#: components/Edit
# defaultMessage: Enter a field of type 'Sender E-mail'. If it is not present, or it is present but not filled in by the user, the sender address of the e-mail will be the one configured in the right sidebar.
msgid "form_edit_warning_from"
msgstr "Inserire un campo di tipo 'E-mail mittente'. Se non è presente, oppure è presente ma non viene compilato dall'utente, l'indirizzo del mittente della mail sarà quello configurato dalla sidebar di destra."
msgstr "Inserire un campo di tipo 'E-mail mittente'. Se non è presente, oppure è presente ma non viene compilato dall'utente, l'indirizzo del mittente dell'email sarà quello configurato dalla sidebar di destra."

#: components/FormView
# defaultMessage: There are some errors in the form.
Expand Down Expand Up @@ -549,6 +549,21 @@ msgstr "L'email inserita non è corretta"
msgid "formblock_requiredFieldMessage"
msgstr "Compila questo campo"

#: formSchema
# defaultMessage: Text at the end of the email
msgid "mail_footer_label"
msgstr "Testo alla fine dell'email"

#: formSchema
# defaultMessage: If field isn't filled in, a default text will be used
msgid "mail_header_description"
msgstr "Se il campo non viene compilato verrà utilizzato un testo di default"

#: formSchema
# defaultMessage: Text at the beginning of the email
msgid "mail_header_label"
msgstr "Testo all'inizio dell'email"

#: components/Sidebar
# defaultMessage: remove expired data
msgid "remove_data_button"
Expand Down
15 changes: 15 additions & 0 deletions locales/ja/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,21 @@ msgstr ""
msgid "formblock_requiredFieldMessage"
msgstr ""

#: formSchema
# defaultMessage: Text at the end of the email
msgid "mail_footer_label"
msgstr ""

#: formSchema
# defaultMessage: If field isn't filled in, a default text will be used
msgid "mail_header_description"
msgstr ""

#: formSchema
# defaultMessage: Text at the beginning of the email
msgid "mail_header_label"
msgstr ""

#: components/Sidebar
# defaultMessage: remove expired data
msgid "remove_data_button"
Expand Down
15 changes: 15 additions & 0 deletions locales/nl/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,21 @@ msgstr ""
msgid "formblock_requiredFieldMessage"
msgstr ""

#: formSchema
# defaultMessage: Text at the end of the email
msgid "mail_footer_label"
msgstr ""

#: formSchema
# defaultMessage: If field isn't filled in, a default text will be used
msgid "mail_header_description"
msgstr ""

#: formSchema
# defaultMessage: Text at the beginning of the email
msgid "mail_header_label"
msgstr ""

#: components/Sidebar
# defaultMessage: remove expired data
msgid "remove_data_button"
Expand Down
15 changes: 15 additions & 0 deletions locales/pt/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,21 @@ msgstr ""
msgid "formblock_requiredFieldMessage"
msgstr ""

#: formSchema
# defaultMessage: Text at the end of the email
msgid "mail_footer_label"
msgstr ""

#: formSchema
# defaultMessage: If field isn't filled in, a default text will be used
msgid "mail_header_description"
msgstr ""

#: formSchema
# defaultMessage: Text at the beginning of the email
msgid "mail_header_label"
msgstr ""

#: components/Sidebar
# defaultMessage: remove expired data
msgid "remove_data_button"
Expand Down
15 changes: 15 additions & 0 deletions locales/pt_BR/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,21 @@ msgstr ""
msgid "formblock_requiredFieldMessage"
msgstr ""

#: formSchema
# defaultMessage: Text at the end of the email
msgid "mail_footer_label"
msgstr ""

#: formSchema
# defaultMessage: If field isn't filled in, a default text will be used
msgid "mail_header_description"
msgstr ""

#: formSchema
# defaultMessage: Text at the beginning of the email
msgid "mail_header_label"
msgstr ""

#: components/Sidebar
# defaultMessage: remove expired data
msgid "remove_data_button"
Expand Down
15 changes: 15 additions & 0 deletions locales/ro/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,21 @@ msgstr ""
msgid "formblock_requiredFieldMessage"
msgstr ""

#: formSchema
# defaultMessage: Text at the end of the email
msgid "mail_footer_label"
msgstr ""

#: formSchema
# defaultMessage: If field isn't filled in, a default text will be used
msgid "mail_header_description"
msgstr ""

#: formSchema
# defaultMessage: Text at the beginning of the email
msgid "mail_header_label"
msgstr ""

#: components/Sidebar
# defaultMessage: remove expired data
msgid "remove_data_button"
Expand Down
17 changes: 16 additions & 1 deletion 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-04-17T08:56:51.659Z\n"
"POT-Creation-Date: 2024-06-20T08:56:16.103Z\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 @@ -551,6 +551,21 @@ msgstr ""
msgid "formblock_requiredFieldMessage"
msgstr ""

#: formSchema
# defaultMessage: Text at the end of the email
msgid "mail_footer_label"
msgstr ""

#: formSchema
# defaultMessage: If field isn't filled in, a default text will be used
msgid "mail_header_description"
msgstr ""

#: formSchema
# defaultMessage: Text at the beginning of the email
msgid "mail_header_label"
msgstr ""

#: components/Sidebar
# defaultMessage: remove expired data
msgid "remove_data_button"
Expand Down
24 changes: 24 additions & 0 deletions src/formSchema.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,18 @@ const messages = defineMessages({
id: 'form_manage_data',
defaultMessage: 'Manage data',
},
mail_header_label: {
id: 'mail_header_label',
defaultMessage: 'Text at the beginning of the email',
},
mail_header_footer_description: {
id: 'mail_header_description',
defaultMessage: 'If field isn\'t filled in, a default text will be used',
},
mail_footer_label: {
id: 'mail_footer_label',
defaultMessage: 'Text at the end of the email',
},
});

const Schema = (data) => {
Expand All @@ -101,6 +113,8 @@ const Schema = (data) => {
'submit_label',
'show_cancel',
...(data?.show_cancel ? ['cancel_label'] : []),
'mail_header',
'mail_footer',
'captcha',
],
},
Expand Down Expand Up @@ -138,6 +152,16 @@ const Schema = (data) => {
cancel_label: {
title: intl.formatMessage(messages.cancel_label),
},
mail_header: {
title: intl.formatMessage(messages.mail_header_label),
widget: 'textarea',
description: intl.formatMessage(messages.mail_header_footer_description),
},
mail_footer: {
title: intl.formatMessage(messages.mail_footer_label),
widget: 'textarea',
description: intl.formatMessage(messages.mail_header_footer_description)
},
captcha: {
title: intl.formatMessage(messages.captcha),
type: 'string',
Expand Down

0 comments on commit d74cf6c

Please sign in to comment.