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

UIU-3302: Create/Edit a Patron Block - HTML page title #2829

Merged
merged 2 commits into from
Jan 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* Remove duplicates from the keyboard shortcut modal. Refs UIU-3026.
* React v19: refactor away from default props for functional components. Refs. UIU-3141.
* Hide Create block button for user without permission. Refs UIU-3300.
* Add HTML page title to add/edit patron block page. Refs UIU-3302.

## [11.0.10](https://github.com/folio-org/ui-users/tree/v11.0.10) (2025-01-10)
[Full Changelog](https://github.com/folio-org/ui-users/compare/v11.0.9...v11.0.10)
Expand Down
9 changes: 7 additions & 2 deletions src/components/PatronBlock/PatronBlockLayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
import PropTypes from 'prop-types';
import moment from 'moment';
import { ConfirmationModal } from '@folio/stripes/components';
import { TitleManager } from '@folio/stripes/core';
import PatronBlockForm from './PatronBlockForm';

class PatronBlockLayer extends React.Component {
Expand Down Expand Up @@ -168,8 +169,12 @@ class PatronBlockLayer extends React.Component {
{intl.formatMessage({ id: 'ui-users.blocks.message' })}
</span> : '';

const title = params.patronblockid ? intl.formatMessage({ id: 'ui-users.title.patronBlock.edit' })
:
intl.formatMessage({ id: 'ui-users.title.patronBlock.create' });

return (
<>
<TitleManager page={title}>
<PatronBlockForm
intl={intl}
stripes={stripes}
Expand All @@ -190,7 +195,7 @@ class PatronBlockLayer extends React.Component {
heading={intl.formatMessage({ id: 'ui-users.blocks.layer.heading' })}
message={message}
/>
</>
</TitleManager>
);
}
}
Expand Down
5 changes: 4 additions & 1 deletion translations/ui-users/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1234,5 +1234,8 @@
"stagingRecords.message.noAccessToStagingRecordsPage": "User does not have permission to access \"Patron preregistration record results\" page",
"stagingUser.createUser": "FOLIO user record <b>{name}</b> has been successfully created.",
"keycloak.modal.confirmationHeading": "Keycloak user record",
"keycloak.modal.creation": "This operation will create new record in Keycloak for <b>{user}</b>"
"keycloak.modal.creation": "This operation will create new record in Keycloak for <b>{user}</b>",

"title.patronBlock.create": "Users - Create a new patron block",
"title.patronBlock.edit": "Users - Edit a patron block"
}
Loading