Skip to content

Commit

Permalink
Added form validation.
Browse files Browse the repository at this point in the history
  • Loading branch information
robgietema committed Apr 30, 2017
1 parent 74f4de7 commit e1de47d
Show file tree
Hide file tree
Showing 22 changed files with 383 additions and 103 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -2,6 +2,7 @@

## [Unreleased]
### Added
- Form validation @robgietema
- Notification messages @robgietema

## 0.3.0 (2017-04-29)
Expand Down
24 changes: 20 additions & 4 deletions locales/de/LC_MESSAGES/plone-react.po
Expand Up @@ -289,6 +289,11 @@ msgstr "Artikel ausgeschnitten."
msgid "Item(s) pasted."
msgstr "Artikel eingefügt."

#: components/manage/Form/Form
#: components/manage/Form/ModalForm
msgid "Items must be unique."
msgstr ""

#: components/manage/Preferences/PersonalPreferences
msgid "Language"
msgstr "Sprache"
Expand All @@ -314,6 +319,11 @@ msgstr "Abmelden"
msgid "Login Name"
msgstr "Benutzername"

#: components/manage/Form/Form
#: components/manage/Form/ModalForm
msgid "Minimum length is {len}."
msgstr ""

#: components/manage/Contents/ContentsItem
msgid "Move to bottom of folder"
msgstr "Zum Anfang des Ordners wechseln"
Expand Down Expand Up @@ -423,6 +433,11 @@ msgstr "Umbenennen"
msgid "Rename items"
msgstr "Artikel umbenennen"

#: components/manage/Form/Form
#: components/manage/Form/ModalForm
msgid "Required input is missing."
msgstr ""

#: components/manage/History/History
msgid "Revert to this revision"
msgstr "Durch diese Version ersetzen"
Expand Down Expand Up @@ -524,6 +539,11 @@ msgstr "Die URL Ihrer externen Homepage, sollten Sie eine besitzen."
msgid "The {plonecms} is {copyright} 2000-{current_year} by the {plonefoundation} and friends."
msgstr "{plonecms} {copyright} 2000-{current_year} {plonefoundation} und Freunde."

#: components/manage/Form/Form
#: components/manage/Form/ModalForm
msgid "There were some errors."
msgstr "Es gab Fehler."

#: components/manage/Contents/ContentsRenameModal
msgid "This name will be displayed in the URL."
msgstr "Dieser Name wird in der Adressleiste des Browsers angezeigt."
Expand Down Expand Up @@ -634,7 +654,3 @@ msgstr "{title} ausgeschnitten."
#: components/manage/Actions/Actions
msgid "{title} has been deleted."
msgstr "{title} wurde gelöscht."

#: components/manage/Actions/Actions
msgid "{title} renamed."
msgstr "{title} umbenannt."
24 changes: 20 additions & 4 deletions locales/en/LC_MESSAGES/plone-react.po
Expand Up @@ -274,6 +274,11 @@ msgstr ""
msgid "Item(s) pasted."
msgstr ""

#: components/manage/Form/Form
#: components/manage/Form/ModalForm
msgid "Items must be unique."
msgstr ""

#: components/manage/Preferences/PersonalPreferences
msgid "Language"
msgstr ""
Expand All @@ -299,6 +304,11 @@ msgstr ""
msgid "Login Name"
msgstr ""

#: components/manage/Form/Form
#: components/manage/Form/ModalForm
msgid "Minimum length is {len}."
msgstr ""

#: components/manage/Contents/ContentsItem
msgid "Move to bottom of folder"
msgstr ""
Expand Down Expand Up @@ -408,6 +418,11 @@ msgstr ""
msgid "Rename items"
msgstr ""

#: components/manage/Form/Form
#: components/manage/Form/ModalForm
msgid "Required input is missing."
msgstr ""

#: components/manage/History/History
msgid "Revert to this revision"
msgstr ""
Expand Down Expand Up @@ -509,6 +524,11 @@ msgstr ""
msgid "The {plonecms} is {copyright} 2000-{current_year} by the {plonefoundation} and friends."
msgstr ""

#: components/manage/Form/Form
#: components/manage/Form/ModalForm
msgid "There were some errors."
msgstr ""

#: components/manage/Contents/ContentsRenameModal
msgid "This name will be displayed in the URL."
msgstr ""
Expand Down Expand Up @@ -619,7 +639,3 @@ msgstr ""
#: components/manage/Actions/Actions
msgid "{title} has been deleted."
msgstr ""

#: components/manage/Actions/Actions
msgid "{title} renamed."
msgstr ""
24 changes: 20 additions & 4 deletions locales/nl/LC_MESSAGES/plone-react.po
Expand Up @@ -293,6 +293,11 @@ msgstr "Item(d) geknipt."
msgid "Item(s) pasted."
msgstr "Item(s) geplakt."

#: components/manage/Form/Form
#: components/manage/Form/ModalForm
msgid "Items must be unique."
msgstr "Items moeten uniek zijn."

#: components/manage/Preferences/PersonalPreferences
msgid "Language"
msgstr "Taal"
Expand All @@ -318,6 +323,11 @@ msgstr "Uitloggen"
msgid "Login Name"
msgstr "Gebruikersnaam"

#: components/manage/Form/Form
#: components/manage/Form/ModalForm
msgid "Minimum length is {len}."
msgstr "Minimum lengte is {len}"

#: components/manage/Contents/ContentsItem
msgid "Move to bottom of folder"
msgstr "Verplaats naar onder in de map"
Expand Down Expand Up @@ -427,6 +437,11 @@ msgstr "Naam wijzigen"
msgid "Rename items"
msgstr "Naam wijzigen"

#: components/manage/Form/Form
#: components/manage/Form/ModalForm
msgid "Required input is missing."
msgstr "Verplichte waarde mist."

#: components/manage/History/History
msgid "Revert to this revision"
msgstr "Deze rivisie herstellen"
Expand Down Expand Up @@ -528,6 +543,11 @@ msgstr "Het internet adres van uw externe home page, indien u die heeft."
msgid "The {plonecms} is {copyright} 2000-{current_year} by the {plonefoundation} and friends."
msgstr "Het {plonecms} is {copyright} 2000-{current_year} door de {plonefoundation} et al."

#: components/manage/Form/Form
#: components/manage/Form/ModalForm
msgid "There were some errors."
msgstr "Er zijn fouten opgetreden."

#: components/manage/Contents/ContentsRenameModal
msgid "This name will be displayed in the URL."
msgstr "Deze naam wordt getoond in de URL."
Expand Down Expand Up @@ -638,7 +658,3 @@ msgstr "{title} geknipt."
#: components/manage/Actions/Actions
msgid "{title} has been deleted."
msgstr "{title} is verwijderd."

#: components/manage/Actions/Actions
msgid "{title} renamed."
msgstr "{title} hernoemd"
31 changes: 25 additions & 6 deletions locales/plone-react.pot
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: Plone\n"
"POT-Creation-Date: 2017-04-30T08:55:34.147Z\n"
"POT-Creation-Date: 2017-04-30T16:20:43.407Z\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 @@ -336,6 +336,12 @@ msgstr ""
msgid "Item(s) pasted."
msgstr ""

#: components/manage/Form/Form
#: components/manage/Form/ModalForm
# defaultMessage: Items must be unique.
msgid "Items must be unique."
msgstr ""

#: components/manage/Preferences/PersonalPreferences
# defaultMessage: Language
msgid "Language"
Expand Down Expand Up @@ -367,6 +373,12 @@ msgstr ""
msgid "Login Name"
msgstr ""

#: components/manage/Form/Form
#: components/manage/Form/ModalForm
# defaultMessage: Minimum length is {len}.
msgid "Minimum length is {len}."
msgstr ""

#: components/manage/Contents/ContentsItem
# defaultMessage: Move to bottom of folder
msgid "Move to bottom of folder"
Expand Down Expand Up @@ -501,6 +513,12 @@ msgstr ""
msgid "Rename items"
msgstr ""

#: components/manage/Form/Form
#: components/manage/Form/ModalForm
# defaultMessage: Required input is missing.
msgid "Required input is missing."
msgstr ""

#: components/manage/History/History
# defaultMessage: Revert to this revision
msgid "Revert to this revision"
Expand Down Expand Up @@ -626,6 +644,12 @@ msgstr ""
msgid "The {plonecms} is {copyright} 2000-{current_year} by the {plonefoundation} and friends."
msgstr ""

#: components/manage/Form/Form
#: components/manage/Form/ModalForm
# defaultMessage: There were some errors.
msgid "There were some errors."
msgstr ""

#: components/manage/Contents/ContentsRenameModal
# defaultMessage: This name will be displayed in the URL.
msgid "This name will be displayed in the URL."
Expand Down Expand Up @@ -763,8 +787,3 @@ msgstr ""
# defaultMessage: {title} has been deleted.
msgid "{title} has been deleted."
msgstr ""

#: components/manage/Actions/Actions
# defaultMessage: {title} renamed.
msgid "{title} renamed."
msgstr ""
11 changes: 0 additions & 11 deletions src/components/manage/Actions/Actions.jsx
Expand Up @@ -59,10 +59,6 @@ const messages = defineMessages({
id: 'Item(s) pasted.',
defaultMessage: 'Item(s) pasted.',
},
messageRenamed: {
id: '{title} renamed.',
defaultMessage: '{title} renamed.',
},
});

/**
Expand Down Expand Up @@ -144,13 +140,6 @@ export default class Actions extends Component {
this.setState({
showRename: false,
});
this.props.addMessage(
null,
this.props.intl.formatMessage(messages.messageRenamed, {
title: this.props.title,
}),
'success',
);
}

/**
Expand Down

0 comments on commit e1de47d

Please sign in to comment.