Skip to content

Commit

Permalink
Merge branch 'master' into fixheaderlevelinlisting
Browse files Browse the repository at this point in the history
* master:
  Use a Container from the registry in the Form component and fallback to the Semantic UI one (#4849)
  Display password validation error if available; update minimum password length (#4801)
  • Loading branch information
sneridagh committed Jun 6, 2023
2 parents e5589ba + 869d5ac commit daf86ab
Show file tree
Hide file tree
Showing 21 changed files with 59 additions and 52 deletions.
6 changes: 3 additions & 3 deletions locales/ca/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -1272,9 +1272,9 @@ msgstr ""

#: components/manage/Preferences/ChangePassword
#: components/theme/PasswordReset/PasswordReset
# defaultMessage: Enter your new password. Minimum 5 characters.
msgid "Enter your new password. Minimum 5 characters."
msgstr "Introduïu la vostra nova contrasenya. Mínim 5 caràcters."
# defaultMessage: Enter your new password. Minimum 8 characters.
msgid "Enter your new password. Minimum 8 characters."
msgstr "Introduïu la vostra nova contrasenya. Mínim 8 caràcters."

#: components/theme/PasswordReset/PasswordReset
# defaultMessage: Enter your username for verification.
Expand Down
6 changes: 3 additions & 3 deletions locales/de/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -1269,9 +1269,9 @@ msgstr "Geben Sie Ihre E-Mail zur Verifikation ein."

#: components/manage/Preferences/ChangePassword
#: components/theme/PasswordReset/PasswordReset
# defaultMessage: Enter your new password. Minimum 5 characters.
msgid "Enter your new password. Minimum 5 characters."
msgstr "Geben Sie ihr neues Passwort ein. Mindestens 5 Zeichen."
# defaultMessage: Enter your new password. Minimum 8 characters.
msgid "Enter your new password. Minimum 8 characters."
msgstr "Geben Sie ihr neues Passwort ein. Mindestens 8 Zeichen."

#: components/theme/PasswordReset/PasswordReset
# defaultMessage: Enter your username for verification.
Expand Down
4 changes: 2 additions & 2 deletions locales/en/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -1263,8 +1263,8 @@ msgstr ""

#: components/manage/Preferences/ChangePassword
#: components/theme/PasswordReset/PasswordReset
# defaultMessage: Enter your new password. Minimum 5 characters.
msgid "Enter your new password. Minimum 5 characters."
# defaultMessage: Enter your new password. Minimum 8 characters.
msgid "Enter your new password. Minimum 8 characters."
msgstr ""

#: components/theme/PasswordReset/PasswordReset
Expand Down
6 changes: 3 additions & 3 deletions locales/es/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -1274,9 +1274,9 @@ msgstr "Introduzca su correo electrónico para verificar."

#: components/manage/Preferences/ChangePassword
#: components/theme/PasswordReset/PasswordReset
# defaultMessage: Enter your new password. Minimum 5 characters.
msgid "Enter your new password. Minimum 5 characters."
msgstr "Introduzca su nueva contraseña. Mínimo 5 caracteres."
# defaultMessage: Enter your new password. Minimum 8 characters.
msgid "Enter your new password. Minimum 8 characters."
msgstr "Introduzca su nueva contraseña. Mínimo 8 caracteres."

#: components/theme/PasswordReset/PasswordReset
# defaultMessage: Enter your username for verification.
Expand Down
6 changes: 3 additions & 3 deletions locales/eu/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -1270,9 +1270,9 @@ msgstr "Idatzi zure eposta helbidea egiaztatu dezagun."

#: components/manage/Preferences/ChangePassword
#: components/theme/PasswordReset/PasswordReset
# defaultMessage: Enter your new password. Minimum 5 characters.
msgid "Enter your new password. Minimum 5 characters."
msgstr "Idatzi zure pasahitz berria. Gutxienez 5 karaktere."
# defaultMessage: Enter your new password. Minimum 8 characters.
msgid "Enter your new password. Minimum 8 characters."
msgstr "Idatzi zure pasahitz berria. Gutxienez 8 karaktere."

#: components/theme/PasswordReset/PasswordReset
# defaultMessage: Enter your username for verification.
Expand Down
6 changes: 3 additions & 3 deletions locales/fi/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -1274,9 +1274,9 @@ msgstr "Syötä sähköpostiosoitteesi vahvistusta varten."

#: components/manage/Preferences/ChangePassword
#: components/theme/PasswordReset/PasswordReset
# defaultMessage: Enter your new password. Minimum 5 characters.
msgid "Enter your new password. Minimum 5 characters."
msgstr "Syötä uusi salasanasi, jossa on vähintään viisi (5) merkkiä."
# defaultMessage: Enter your new password. Minimum 8 characters.
msgid "Enter your new password. Minimum 8 characters."
msgstr "Syötä uusi salasanasi, jossa on vähintään viisi (8) merkkiä."

#: components/theme/PasswordReset/PasswordReset
# defaultMessage: Enter your username for verification.
Expand Down
6 changes: 3 additions & 3 deletions locales/fr/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -1280,9 +1280,9 @@ msgstr "Saisissez votre email pour vérification."

#: components/manage/Preferences/ChangePassword
#: components/theme/PasswordReset/PasswordReset
# defaultMessage: Enter your new password. Minimum 5 characters.
msgid "Enter your new password. Minimum 5 characters."
msgstr "Saisissez votre nouveau mot de passe. Minimum 5 caractères."
# defaultMessage: Enter your new password. Minimum 8 characters.
msgid "Enter your new password. Minimum 8 characters."
msgstr "Saisissez votre nouveau mot de passe. Minimum 8 caractères."

#: components/theme/PasswordReset/PasswordReset
# defaultMessage: Enter your username for verification.
Expand Down
6 changes: 3 additions & 3 deletions locales/it/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -1263,9 +1263,9 @@ msgstr "Inserisci la tua email per la verifica."

#: components/manage/Preferences/ChangePassword
#: components/theme/PasswordReset/PasswordReset
# defaultMessage: Enter your new password. Minimum 5 characters.
msgid "Enter your new password. Minimum 5 characters."
msgstr "Inserisci la tua nuova password. Minimo 5 caratteri."
# defaultMessage: Enter your new password. Minimum 8 characters.
msgid "Enter your new password. Minimum 8 characters."
msgstr "Inserisci la tua nuova password. Minimo 8 caratteri."

#: components/theme/PasswordReset/PasswordReset
# defaultMessage: Enter your username for verification.
Expand Down
6 changes: 3 additions & 3 deletions locales/ja/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -1271,9 +1271,9 @@ msgstr ""

#: components/manage/Preferences/ChangePassword
#: components/theme/PasswordReset/PasswordReset
# defaultMessage: Enter your new password. Minimum 5 characters.
msgid "Enter your new password. Minimum 5 characters."
msgstr "新しいパスワードを入力。(5文字以上)"
# defaultMessage: Enter your new password. Minimum 8 characters.
msgid "Enter your new password. Minimum 8 characters."
msgstr "新しいパスワードを入力。(8文字以上)"

#: components/theme/PasswordReset/PasswordReset
# defaultMessage: Enter your username for verification.
Expand Down
6 changes: 3 additions & 3 deletions locales/nl/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -1282,9 +1282,9 @@ msgstr ""

#: components/manage/Preferences/ChangePassword
#: components/theme/PasswordReset/PasswordReset
# defaultMessage: Enter your new password. Minimum 5 characters.
msgid "Enter your new password. Minimum 5 characters."
msgstr "Geef een nieuw wachtwoord op. Minimaal 5 karakters."
# defaultMessage: Enter your new password. Minimum 8 characters.
msgid "Enter your new password. Minimum 8 characters."
msgstr "Geef een nieuw wachtwoord op. Minimaal 8 karakters."

#: components/theme/PasswordReset/PasswordReset
# defaultMessage: Enter your username for verification.
Expand Down
6 changes: 3 additions & 3 deletions locales/pt/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -1271,9 +1271,9 @@ msgstr ""

#: components/manage/Preferences/ChangePassword
#: components/theme/PasswordReset/PasswordReset
# defaultMessage: Enter your new password. Minimum 5 characters.
msgid "Enter your new password. Minimum 5 characters."
msgstr "Escreva uma senha nova. Mínimo de 5 caracteres."
# defaultMessage: Enter your new password. Minimum 8 characters.
msgid "Enter your new password. Minimum 8 characters."
msgstr "Escreva uma senha nova. Mínimo de 8 caracteres."

#: components/theme/PasswordReset/PasswordReset
# defaultMessage: Enter your username for verification.
Expand Down
6 changes: 3 additions & 3 deletions locales/pt_BR/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -1273,9 +1273,9 @@ msgstr "Informe seu e-mail para verificação."

#: components/manage/Preferences/ChangePassword
#: components/theme/PasswordReset/PasswordReset
# defaultMessage: Enter your new password. Minimum 5 characters.
msgid "Enter your new password. Minimum 5 characters."
msgstr "Digite sua nova senha. Mínimo de 5 caracteres."
# defaultMessage: Enter your new password. Minimum 8 characters.
msgid "Enter your new password. Minimum 8 characters."
msgstr "Digite sua nova senha. Mínimo de 8 caracteres."

#: components/theme/PasswordReset/PasswordReset
# defaultMessage: Enter your username for verification.
Expand Down
6 changes: 3 additions & 3 deletions locales/ro/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -1263,9 +1263,9 @@ msgstr ""

#: components/manage/Preferences/ChangePassword
#: components/theme/PasswordReset/PasswordReset
# defaultMessage: Enter your new password. Minimum 5 characters.
msgid "Enter your new password. Minimum 5 characters."
msgstr "Introduceți noua parolă. Minim 5 caractere."
# defaultMessage: Enter your new password. Minimum 8 characters.
msgid "Enter your new password. Minimum 8 characters."
msgstr "Introduceți noua parolă. Minim 8 caractere."

#: components/theme/PasswordReset/PasswordReset
# defaultMessage: Enter your username for verification.
Expand Down
4 changes: 2 additions & 2 deletions locales/volto.pot
Original file line number Diff line number Diff line change
Expand Up @@ -1265,8 +1265,8 @@ msgstr ""

#: components/manage/Preferences/ChangePassword
#: components/theme/PasswordReset/PasswordReset
# defaultMessage: Enter your new password. Minimum 5 characters.
msgid "Enter your new password. Minimum 5 characters."
# defaultMessage: Enter your new password. Minimum 8 characters.
msgid "Enter your new password. Minimum 8 characters."
msgstr ""

#: components/theme/PasswordReset/PasswordReset
Expand Down
6 changes: 3 additions & 3 deletions locales/zh_CN/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -1269,9 +1269,9 @@ msgstr "输入你的邮箱进行验证"

#: components/manage/Preferences/ChangePassword
#: components/theme/PasswordReset/PasswordReset
# defaultMessage: Enter your new password. Minimum 5 characters.
msgid "Enter your new password. Minimum 5 characters."
msgstr "输入你的新密码。最少5个字符"
# defaultMessage: Enter your new password. Minimum 8 characters.
msgid "Enter your new password. Minimum 8 characters."
msgstr ""

#: components/theme/PasswordReset/PasswordReset
# defaultMessage: Enter your username for verification.
Expand Down
1 change: 1 addition & 0 deletions news/4801.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Display PAS validation errors. [tschorr]
1 change: 1 addition & 0 deletions news/4849.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Use a Container from the registry in the Form component and fallback to the Semantic UI one. @sneridagh
8 changes: 5 additions & 3 deletions src/components/manage/Form/Form.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import { Portal } from 'react-portal';
import { connect } from 'react-redux';
import {
Button,
Container,
Container as SemanticContainer,
Form as UiForm,
Message,
Segment,
Expand Down Expand Up @@ -545,12 +545,14 @@ class Form extends Component {
const { schema: originalSchema, onCancel, onSubmit } = this.props;
const { formData } = this.state;
const schema = this.removeBlocksLayoutFields(originalSchema);
const Container =
config.getComponent({ name: 'Container' }).component || SemanticContainer;

return this.props.visual ? (
// Removing this from SSR is important, since react-beautiful-dnd supports SSR,
// but draftJS don't like it much and the hydration gets messed up
this.state.isClient && (
<div className="ui container">
<Container>
<BlocksToolbar
formData={this.state.formData}
selectedBlock={this.state.selected}
Expand Down Expand Up @@ -639,7 +641,7 @@ class Form extends Component {
</UiForm>
</Portal>
)}
</div>
</Container>
)
) : (
<Container>
Expand Down
4 changes: 2 additions & 2 deletions src/components/manage/Preferences/ChangePassword.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ const messages = defineMessages({
defaultMessage: 'New password',
},
newPasswordDescription: {
id: 'Enter your new password. Minimum 5 characters.',
defaultMessage: 'Enter your new password. Minimum 5 characters.',
id: 'Enter your new password. Minimum 8 characters.',
defaultMessage: 'Enter your new password. Minimum 8 characters.',
},
newPasswordRepeatTitle: {
id: 'Confirm password',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ exports[`ChangePassword renders a change password component 1`] = `
>
New password
-
Enter your new password. Minimum 5 characters.
Enter your new password. Minimum 8 characters.
</div>
<div
className="mocked-password-widget"
Expand Down
9 changes: 6 additions & 3 deletions src/components/theme/PasswordReset/PasswordReset.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ const messages = defineMessages({
defaultMessage: 'New password',
},
passwordDescription: {
id: 'Enter your new password. Minimum 5 characters.',
defaultMessage: 'Enter your new password. Minimum 5 characters.',
id: 'Enter your new password. Minimum 8 characters.',
defaultMessage: 'Enter your new password. Minimum 8 characters.',
},
passwordRepeatTitle: {
id: 'Confirm password',
Expand Down Expand Up @@ -227,6 +227,9 @@ class PasswordReset extends Component {
);
}
if (this.props.token) {
const errmsg = this.props.error
? this.props.error.response.body.error
: null;
return (
<div id="page-password-reset">
<Helmet
Expand All @@ -238,7 +241,7 @@ class PasswordReset extends Component {
description={this.props.intl.formatMessage(messages.description)}
onSubmit={this.onSubmit}
onCancel={this.onCancel}
error={this.state.error || this.props.error}
error={this.state.error || errmsg}
schema={{
fieldsets: [
{
Expand Down

0 comments on commit daf86ab

Please sign in to comment.