Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: updated volto-form-block v3.3.1 and added new features in custom components, fixed layout and invalid field messages and select from drop-down menu #556

Merged
merged 23 commits into from
Mar 4, 2024
Merged
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
cef3f09
feat!: upgrade to volto 17.5.0 (#382)
mamico Nov 21, 2023
ac886fc
Merge branch 'main' into 11-alpha
giuliaghisini Nov 22, 2023
ec1ec5b
feat!: upgrade to design-react-kit 5.0.0-1 and bootstrap-italia 2.6.1…
giuliaghisini Nov 22, 2023
0c2f457
chore: release v11.0.0-alpha.0
pnicolli Nov 22, 2023
2cf34bc
feat!: card image height from newest bootstrap-italia version (#406)
giuliaghisini Nov 23, 2023
39c756c
fix: listing block card-slide-text-template read-more alignment (#416)
SaraBianchi Nov 23, 2023
9460548
chore: release v11.0.0-alpha.1
pnicolli Nov 23, 2023
1767860
Merge branch 'main' into 11-alpha
giuliaghisini Nov 24, 2023
397ba93
fix: image size in listing
giuliaghisini Nov 24, 2023
8fcada1
fix: update volto-editablefooter to 5.0.3
pnicolli Nov 24, 2023
45a52f7
fix: gallery component for ct views breaking with newer backend versi…
pnicolli Nov 28, 2023
28ba7ea
fix: background image for NumbersBlock and Countdown block (#423)
giuliaghisini Nov 29, 2023
3e68da2
chore: release v11.0.0-alpha.2
pnicolli Nov 29, 2023
cccb46f
Merge branch 'main' into 11-alpha
SaraBianchi Nov 30, 2023
b07f0e0
style: fixed input form style
SaraBianchi Dec 28, 2023
e05f452
Merge branch 'main' into us_49195_fix_volto_form_block
SaraBianchi Feb 27, 2024
ef2b7fc
docs: updated release.md and changelog files
SaraBianchi Feb 27, 2024
683a254
fix: remain in form if there's errors on sending form
giuliaghisini Feb 28, 2024
549a77d
chore: updated input type file with aria-invalid and required attributes
SaraBianchi Feb 29, 2024
6520524
chore: updated formView with legend tag for required fields
SaraBianchi Feb 29, 2024
a55bc0a
chore: updated locales and release.md
SaraBianchi Feb 29, 2024
3870499
feat: updated volto-form-block v3.3.1 and added new features in custo…
SaraBianchi Feb 29, 2024
007449a
Merge branch 'main' into us_49195_fix_volto_form_block
pnicolli Mar 4, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: remain in form if there's errors on sending form
  • Loading branch information
giuliaghisini committed Feb 28, 2024
commit 683a254679fd1b047e8c8ffc5f775249df6975b2
5 changes: 5 additions & 0 deletions locales/de/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
@@ -2115,6 +2115,11 @@ msgstr ""
msgid "fine_termine"
msgstr ""

#: overrideTranslations
# defaultMessage: Ricomincia
msgid "form_reset"
msgstr ""

#: components/ItaliaTheme/View/PersonaView/PersonaRuolo
# defaultMessage: Foto dell'attività politica
msgid "foto_attivita_politica"
5 changes: 5 additions & 0 deletions locales/en/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
@@ -2100,6 +2100,11 @@ msgstr "Search"
msgid "fine_termine"
msgstr "End of term"

#: overrideTranslations
# defaultMessage: Ricomincia
msgid "form_reset"
msgstr "Restart"

#: components/ItaliaTheme/View/PersonaView/PersonaRuolo
# defaultMessage: Foto dell'attività politica
msgid "foto_attivita_politica"
5 changes: 5 additions & 0 deletions locales/es/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
@@ -2109,6 +2109,11 @@ msgstr "Buscar"
msgid "fine_termine"
msgstr "Fin de los términos"

#: overrideTranslations
# defaultMessage: Ricomincia
msgid "form_reset"
msgstr ""

#: components/ItaliaTheme/View/PersonaView/PersonaRuolo
# defaultMessage: Foto dell'attività politica
msgid "foto_attivita_politica"
5 changes: 5 additions & 0 deletions locales/fr/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
@@ -2117,6 +2117,11 @@ msgstr "Rechercher"
msgid "fine_termine"
msgstr "Fin du mandat"

#: overrideTranslations
# defaultMessage: Ricomincia
msgid "form_reset"
msgstr ""

#: components/ItaliaTheme/View/PersonaView/PersonaRuolo
# defaultMessage: Foto dell'attività politica
msgid "foto_attivita_politica"
5 changes: 5 additions & 0 deletions locales/it/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
@@ -2100,6 +2100,11 @@ msgstr "Cerca"
msgid "fine_termine"
msgstr "Fine termine"

#: overrideTranslations
# defaultMessage: Ricomincia
msgid "form_reset"
msgstr "Ricomincia"

#: components/ItaliaTheme/View/PersonaView/PersonaRuolo
# defaultMessage: Foto dell'attività politica
msgid "foto_attivita_politica"
9 changes: 7 additions & 2 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: 2024-02-19T11:08:36.048Z\n"
"POT-Creation-Date: 2024-02-28T11:09:39.592Z\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"
@@ -2102,6 +2102,11 @@ msgstr ""
msgid "fine_termine"
msgstr ""

#: overrideTranslations
# defaultMessage: Ricomincia
msgid "form_reset"
msgstr ""

#: components/ItaliaTheme/View/PersonaView/PersonaRuolo
# defaultMessage: Foto dell'attività politica
msgid "foto_attivita_politica"
@@ -3238,7 +3243,7 @@ msgid "search_startDate"
msgstr ""

#: helpers/Translations/searchBlockExtendedTranslations
# defaultMessage: Ricerca per: <em>{searchedtext}</em>.
# defaultMessage: Ricerca per: <em>{searchedtext}</em>.
msgid "searchedFor"
msgstr ""

38 changes: 21 additions & 17 deletions src/customizations/volto-form-block/components/FormView.jsx
Original file line number Diff line number Diff line change
@@ -51,6 +51,7 @@ const FormView = ({
data,
onSubmit,
resetFormState,
resetFormOnError,
captcha,
}) => {
const intl = useIntl();
@@ -83,6 +84,11 @@ const FormView = ({
}
}

const submit = (e) => {
resetFormOnError();
onSubmit(e);
};

return (
<div className="block form">
<div className="public-ui">
@@ -93,21 +99,7 @@ const FormView = ({
)}
<Card className="card-bg rounded py-3" noWrapper={false} tag="div">
<CardBody tag="div">
{formState.error ? (
<Alert
color="danger"
fade
isOpen
tag="div"
transition={alertTransition}
>
<h4>{intl.formatMessage(messages.error)}</h4>
<p>{formState.error}</p>
<Button type="clear" onClick={resetFormState}>
{intl.formatMessage(messages.reset)}
</Button>
</Alert>
) : formState.result ? (
{formState.result ? (
<Alert
color="success"
fade
@@ -117,13 +109,13 @@ const FormView = ({
>
<h4>{intl.formatMessage(messages.success)}</h4>
<br />
<Button type="clear" onClick={resetFormState}>
<Button color="primary" outline onClick={resetFormState}>
{intl.formatMessage(messages.reset)}
</Button>
</Alert>
) : (
<form
onSubmit={onSubmit}
onSubmit={submit}
noValidate
autoComplete="off"
method="post"
@@ -204,6 +196,18 @@ const FormView = ({
<p>{intl.formatMessage(messages.empty_values)}</p>
</Alert>
)}
{formState.error && (
<Alert
color="danger"
fade
isOpen
tag="div"
transition={alertTransition}
>
<h4>{intl.formatMessage(messages.error)}</h4>
<p>{formState.error}</p>
</Alert>
)}

<Row>
<Col align="center">
5 changes: 5 additions & 0 deletions src/overrideTranslations.jsx
Original file line number Diff line number Diff line change
@@ -25,4 +25,9 @@ defineMessages({
id: 'rrule_on the',
defaultMessage: 'il',
},
reset: {
//volto-form-block
id: 'form_reset',
defaultMessage: 'Ricomincia',
},
});
Loading