Skip to content

Commit

Permalink
Merge branch 'master' into STCOR-679
Browse files Browse the repository at this point in the history
  • Loading branch information
zburke authored Aug 28, 2023
2 parents 5745658 + e086ca0 commit 691d82b
Show file tree
Hide file tree
Showing 35 changed files with 113 additions and 39 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
* *BREAKING* bump `react` to `v18`, and dev-deps accordingly. Refs STCOR-729.
* Added `consortiaServices` utils to hold common consortia helpers. Refs STCOR-733.
* Bump `@formatjs/cli` to `^6.1.3`.
* Forgot password and Forgot username : add placeholder to input box. Refs STCOR-728.
* Include `yarn.lock`. Refs STCOR-679.

## [9.0.0](https://github.com/folio-org/stripes-core/tree/v9.0.0) (2023-01-30)
Expand Down
4 changes: 2 additions & 2 deletions doc/adding-permissions.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ $

## Generate a module descriptor

This can be done using a script provided with stripes-core (and which is used in back-end deployment):
This can be done using a script provided with [Stripes CLI](https://github.com/folio-org/stripes-cli) (and which is used in back-end deployment):
```
$ node ../stripes-core/util/package2md.js package.json > MD.json
$ stripes mod descriptor --full > MD.json
```
You can look at the generated module descriptor in your editor if you like. It's in the same format as any other [Okapi module descriptor](https://github.com/folio-org/okapi/blob/master/doc/guide.md#example-4-complete-moduledescriptor).

Expand Down
11 changes: 8 additions & 3 deletions src/components/ForgotPassword/ForgotPasswordForm.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Field, Form } from 'react-final-form';
import { FormattedMessage } from 'react-intl';
import { FormattedMessage, injectIntl } from 'react-intl';

import {
TextField,
Expand All @@ -20,6 +20,9 @@ class ForgotPasswordForm extends Component {
static propTypes = {
onSubmit: PropTypes.func.isRequired,
errors: PropTypes.arrayOf(PropTypes.object),
intl: PropTypes.shape({
formatMessage: PropTypes.func.isRequired,
}),
};

static defaultProps = {
Expand All @@ -29,7 +32,8 @@ class ForgotPasswordForm extends Component {
render() {
const {
errors,
onSubmit
onSubmit,
intl: { formatMessage }
} = this.props;

return (
Expand Down Expand Up @@ -74,6 +78,7 @@ class ForgotPasswordForm extends Component {
autoComplete="on"
autoCapitalize="none"
autoFocus
placeholder={formatMessage({ id: 'stripes-core.placeholder.forgotPassword' })}
/>
</div>
<Button
Expand Down Expand Up @@ -111,4 +116,4 @@ class ForgotPasswordForm extends Component {
}
}

export default ForgotPasswordForm;
export default injectIntl(ForgotPasswordForm);
11 changes: 8 additions & 3 deletions src/components/ForgotUserName/ForgotUserNameForm.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Field, Form } from 'react-final-form';
import { FormattedMessage } from 'react-intl';
import { FormattedMessage, injectIntl } from 'react-intl';

import {
TextField,
Expand All @@ -22,6 +22,9 @@ class ForgotUserNameForm extends Component {
isValid: PropTypes.bool.isRequired,
onSubmit: PropTypes.func.isRequired,
errors: PropTypes.arrayOf(PropTypes.object),
intl: PropTypes.shape({
formatMessage: PropTypes.func.isRequired,
}),
};

static defaultProps = {
Expand All @@ -32,7 +35,8 @@ class ForgotUserNameForm extends Component {
const {
onSubmit,
isValid,
errors
errors,
intl: { formatMessage },
} = this.props;

return (
Expand Down Expand Up @@ -77,6 +81,7 @@ class ForgotUserNameForm extends Component {
autoComplete="on"
autoCapitalize="none"
autoFocus
placeholder={formatMessage({ id: 'stripes-core.placeholder.forgotUsername' })}
/>
</div>
<Button
Expand Down Expand Up @@ -117,4 +122,4 @@ class ForgotUserNameForm extends Component {
}
}

export default ForgotUserNameForm;
export default injectIntl(ForgotUserNameForm);
4 changes: 3 additions & 1 deletion translations/stripes-core/ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,5 +142,7 @@
"front.error.noPermission": "ليس لديك صلاحية لعرض هذا التطبيق/التسجيلة",
"button.duplicate": "تكرار",
"stale.warning": "The application has changed on the server and needs to be refreshed.",
"stale.reload": "Click here to reload."
"stale.reload": "Click here to reload.",
"placeholder.forgotPassword": "Enter email or phone",
"placeholder.forgotUsername": "Enter email or phone"
}
4 changes: 3 additions & 1 deletion translations/stripes-core/ber.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,5 +142,7 @@
"front.error.noPermission": "You don't have permission to view this app/record",
"button.duplicate": "Duplicate",
"stale.warning": "The application has changed on the server and needs to be refreshed.",
"stale.reload": "Click here to reload."
"stale.reload": "Click here to reload.",
"placeholder.forgotPassword": "Enter email or phone",
"placeholder.forgotUsername": "Enter email or phone"
}
4 changes: 3 additions & 1 deletion translations/stripes-core/ca.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,5 +142,7 @@
"front.error.noPermission": "You don't have permission to view this app/record",
"button.duplicate": "Duplicate",
"stale.warning": "The application has changed on the server and needs to be refreshed.",
"stale.reload": "Click here to reload."
"stale.reload": "Click here to reload.",
"placeholder.forgotPassword": "Enter email or phone",
"placeholder.forgotUsername": "Enter email or phone"
}
6 changes: 4 additions & 2 deletions translations/stripes-core/cs_CZ.json
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@
"title.noPermission": "Bez povolení",
"front.error.noPermission": "K zobrazení této aplikace/záznamu nemáte oprávnění",
"button.duplicate": "Duplikovat",
"stale.warning": "Aplikace se na serveru změnila a je třeba ji aktualizovat.",
"stale.reload": "Klikněte zde pro opětovné načtení."
"stale.warning": "Aplikace se na serveru změnila a je třeba ji obnovit.",
"stale.reload": "Klikněte zde pro opětovné načtení.",
"placeholder.forgotPassword": "Zadejte e-mail nebo telefon",
"placeholder.forgotUsername": "Zadejte e-mail nebo telefon"
}
4 changes: 3 additions & 1 deletion translations/stripes-core/da.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,5 +142,7 @@
"front.error.noPermission": "You don't have permission to view this app/record",
"button.duplicate": "Duplicate",
"stale.warning": "The application has changed on the server and needs to be refreshed.",
"stale.reload": "Click here to reload."
"stale.reload": "Click here to reload.",
"placeholder.forgotPassword": "Enter email or phone",
"placeholder.forgotUsername": "Enter email or phone"
}
4 changes: 3 additions & 1 deletion translations/stripes-core/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,5 +142,7 @@
"front.error.noPermission": "Sie haben keine Berechtigung, diese App/diesen Datensatz aufzurufen",
"button.duplicate": "Duplizieren",
"stale.warning": "The application has changed on the server and needs to be refreshed.",
"stale.reload": "Click here to reload."
"stale.reload": "Click here to reload.",
"placeholder.forgotPassword": "Enter email or phone",
"placeholder.forgotUsername": "Enter email or phone"
}
3 changes: 3 additions & 0 deletions translations/stripes-core/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,9 @@
"createResetPassword.confirmPassword": "Confirm Password",
"createResetPassword.ruleTemplate": "Must {description}",

"placeholder.forgotPassword": "Enter email or phone",
"placeholder.forgotUsername": "Enter email or phone",

"routeErrorBoundary.sub": "An error occurred on this page and it could not be loaded.",
"routeErrorBoundary.goToAppHomeLabel": "Return to home",
"routeErrorBoundary.goToModuleHomeLabel": "Return to {name} landing page",
Expand Down
4 changes: 3 additions & 1 deletion translations/stripes-core/en_GB.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,5 +142,7 @@
"front.error.noPermission": "You don't have permission to view this app/record",
"button.duplicate": "Duplicate",
"stale.warning": "The application has changed on the server and needs to be refreshed.",
"stale.reload": "Click here to reload."
"stale.reload": "Click here to reload.",
"placeholder.forgotPassword": "Enter email or phone",
"placeholder.forgotUsername": "Enter email or phone"
}
4 changes: 3 additions & 1 deletion translations/stripes-core/en_SE.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,5 +142,7 @@
"front.error.noPermission": "You don't have permission to view this app/record",
"button.duplicate": "Duplicate",
"stale.warning": "The application has changed on the server and needs to be refreshed.",
"stale.reload": "Click here to reload."
"stale.reload": "Click here to reload.",
"placeholder.forgotPassword": "Enter email or phone",
"placeholder.forgotUsername": "Enter email or phone"
}
4 changes: 3 additions & 1 deletion translations/stripes-core/en_US.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,5 +142,7 @@
"front.error.noPermission": "You don't have permission to view this app/record",
"button.duplicate": "Duplicate",
"stale.warning": "The application has changed on the server and needs to be refreshed.",
"stale.reload": "Click here to reload."
"stale.reload": "Click here to reload.",
"placeholder.forgotPassword": "Enter email or phone",
"placeholder.forgotUsername": "Enter email or phone"
}
4 changes: 3 additions & 1 deletion translations/stripes-core/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,5 +142,7 @@
"front.error.noPermission": "You don't have permission to view this app/record",
"button.duplicate": "Duplicate",
"stale.warning": "The application has changed on the server and needs to be refreshed.",
"stale.reload": "Click here to reload."
"stale.reload": "Click here to reload.",
"placeholder.forgotPassword": "Enter email or phone",
"placeholder.forgotUsername": "Enter email or phone"
}
4 changes: 3 additions & 1 deletion translations/stripes-core/es_419.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,5 +142,7 @@
"front.error.noPermission": "No tienes permiso para ver esta aplicación/registro",
"button.duplicate": "Duplicado",
"stale.warning": "La aplicación ha cambiado en el servidor y necesita ser actualizada.",
"stale.reload": "Haga clic aquí para recargar."
"stale.reload": "Haga clic aquí para recargar.",
"placeholder.forgotPassword": "Enter email or phone",
"placeholder.forgotUsername": "Enter email or phone"
}
4 changes: 3 additions & 1 deletion translations/stripes-core/es_ES.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,5 +142,7 @@
"front.error.noPermission": "You don't have permission to view this app/record",
"button.duplicate": "Duplicate",
"stale.warning": "The application has changed on the server and needs to be refreshed.",
"stale.reload": "Click here to reload."
"stale.reload": "Click here to reload.",
"placeholder.forgotPassword": "Enter email or phone",
"placeholder.forgotUsername": "Enter email or phone"
}
4 changes: 3 additions & 1 deletion translations/stripes-core/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,5 +142,7 @@
"front.error.noPermission": "You don't have permission to view this app/record",
"button.duplicate": "Duplicate",
"stale.warning": "The application has changed on the server and needs to be refreshed.",
"stale.reload": "Click here to reload."
"stale.reload": "Click here to reload.",
"placeholder.forgotPassword": "Enter email or phone",
"placeholder.forgotUsername": "Enter email or phone"
}
4 changes: 3 additions & 1 deletion translations/stripes-core/fr_FR.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,5 +142,7 @@
"front.error.noPermission": "You don't have permission to view this app/record",
"button.duplicate": "Dupliquer",
"stale.warning": "The application has changed on the server and needs to be refreshed.",
"stale.reload": "Click here to reload."
"stale.reload": "Click here to reload.",
"placeholder.forgotPassword": "Enter email or phone",
"placeholder.forgotUsername": "Enter email or phone"
}
4 changes: 3 additions & 1 deletion translations/stripes-core/he.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,5 +142,7 @@
"front.error.noPermission": "You don't have permission to view this app/record",
"button.duplicate": "Duplicate",
"stale.warning": "The application has changed on the server and needs to be refreshed.",
"stale.reload": "Click here to reload."
"stale.reload": "Click here to reload.",
"placeholder.forgotPassword": "Enter email or phone",
"placeholder.forgotUsername": "Enter email or phone"
}
4 changes: 3 additions & 1 deletion translations/stripes-core/hi_IN.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,5 +142,7 @@
"front.error.noPermission": "You don't have permission to view this app/record",
"button.duplicate": "Duplicate",
"stale.warning": "The application has changed on the server and needs to be refreshed.",
"stale.reload": "Click here to reload."
"stale.reload": "Click here to reload.",
"placeholder.forgotPassword": "Enter email or phone",
"placeholder.forgotUsername": "Enter email or phone"
}
4 changes: 3 additions & 1 deletion translations/stripes-core/hu.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,5 +142,7 @@
"front.error.noPermission": "You don't have permission to view this app/record",
"button.duplicate": "Duplicate",
"stale.warning": "The application has changed on the server and needs to be refreshed.",
"stale.reload": "Click here to reload."
"stale.reload": "Click here to reload.",
"placeholder.forgotPassword": "Enter email or phone",
"placeholder.forgotUsername": "Enter email or phone"
}
4 changes: 3 additions & 1 deletion translations/stripes-core/it_IT.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,5 +142,7 @@
"front.error.noPermission": "You don't have permission to view this app/record",
"button.duplicate": "Duplicare",
"stale.warning": "The application has changed on the server and needs to be refreshed.",
"stale.reload": "Click here to reload."
"stale.reload": "Click here to reload.",
"placeholder.forgotPassword": "Enter email or phone",
"placeholder.forgotUsername": "Enter email or phone"
}
4 changes: 3 additions & 1 deletion translations/stripes-core/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,5 +142,7 @@
"front.error.noPermission": "You don't have permission to view this app/record",
"button.duplicate": "複製",
"stale.warning": "サーバー上でアプリケーションが変更されたため、更新する必要があります。",
"stale.reload": "ここをクリックしてリロードしてください。"
"stale.reload": "ここをクリックしてリロードしてください。",
"placeholder.forgotPassword": "Enter email or phone",
"placeholder.forgotUsername": "Enter email or phone"
}
4 changes: 3 additions & 1 deletion translations/stripes-core/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,5 +142,7 @@
"front.error.noPermission": "이 앱/레코드를 볼 수 있는 권한이 없습니다.",
"button.duplicate": "복제",
"stale.warning": "The application has changed on the server and needs to be refreshed.",
"stale.reload": "Click here to reload."
"stale.reload": "Click here to reload.",
"placeholder.forgotPassword": "Enter email or phone",
"placeholder.forgotUsername": "Enter email or phone"
}
4 changes: 3 additions & 1 deletion translations/stripes-core/nb.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,5 +142,7 @@
"front.error.noPermission": "You don't have permission to view this app/record",
"button.duplicate": "Duplicate",
"stale.warning": "The application has changed on the server and needs to be refreshed.",
"stale.reload": "Click here to reload."
"stale.reload": "Click here to reload.",
"placeholder.forgotPassword": "Enter email or phone",
"placeholder.forgotUsername": "Enter email or phone"
}
4 changes: 3 additions & 1 deletion translations/stripes-core/nn.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,5 +142,7 @@
"front.error.noPermission": "You don't have permission to view this app/record",
"button.duplicate": "Duplicate",
"stale.warning": "The application has changed on the server and needs to be refreshed.",
"stale.reload": "Click here to reload."
"stale.reload": "Click here to reload.",
"placeholder.forgotPassword": "Enter email or phone",
"placeholder.forgotUsername": "Enter email or phone"
}
4 changes: 3 additions & 1 deletion translations/stripes-core/pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,5 +142,7 @@
"front.error.noPermission": "You don't have permission to view this app/record",
"button.duplicate": "Duplicate",
"stale.warning": "The application has changed on the server and needs to be refreshed.",
"stale.reload": "Click here to reload."
"stale.reload": "Click here to reload.",
"placeholder.forgotPassword": "Enter email or phone",
"placeholder.forgotUsername": "Enter email or phone"
}
4 changes: 3 additions & 1 deletion translations/stripes-core/pt_BR.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,5 +142,7 @@
"front.error.noPermission": "Você não tem permissão para ver este aplicativo/registro",
"button.duplicate": "Duplicar",
"stale.warning": "O aplicativo foi alterado no servidor e precisa ser atualizado.",
"stale.reload": "Clique aqui para recarregar."
"stale.reload": "Clique aqui para recarregar.",
"placeholder.forgotPassword": "Enter email or phone",
"placeholder.forgotUsername": "Enter email or phone"
}
4 changes: 3 additions & 1 deletion translations/stripes-core/pt_PT.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,5 +142,7 @@
"front.error.noPermission": "You don't have permission to view this app/record",
"button.duplicate": "Duplicate",
"stale.warning": "The application has changed on the server and needs to be refreshed.",
"stale.reload": "Click here to reload."
"stale.reload": "Click here to reload.",
"placeholder.forgotPassword": "Enter email or phone",
"placeholder.forgotUsername": "Enter email or phone"
}
4 changes: 3 additions & 1 deletion translations/stripes-core/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,5 +142,7 @@
"front.error.noPermission": "You don't have permission to view this app/record",
"button.duplicate": "Duplicate",
"stale.warning": "The application has changed on the server and needs to be refreshed.",
"stale.reload": "Click here to reload."
"stale.reload": "Click here to reload.",
"placeholder.forgotPassword": "Enter email or phone",
"placeholder.forgotUsername": "Enter email or phone"
}
4 changes: 3 additions & 1 deletion translations/stripes-core/sv.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,5 +142,7 @@
"front.error.noPermission": "You don't have permission to view this app/record",
"button.duplicate": "Duplicate",
"stale.warning": "The application has changed on the server and needs to be refreshed.",
"stale.reload": "Click here to reload."
"stale.reload": "Click here to reload.",
"placeholder.forgotPassword": "Enter email or phone",
"placeholder.forgotUsername": "Enter email or phone"
}
4 changes: 3 additions & 1 deletion translations/stripes-core/ur.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,5 +142,7 @@
"front.error.noPermission": "You don't have permission to view this app/record",
"button.duplicate": "Duplicate",
"stale.warning": "The application has changed on the server and needs to be refreshed.",
"stale.reload": "Click here to reload."
"stale.reload": "Click here to reload.",
"placeholder.forgotPassword": "Enter email or phone",
"placeholder.forgotUsername": "Enter email or phone"
}
Loading

0 comments on commit 691d82b

Please sign in to comment.