Skip to content

Commit

Permalink
UIU-3302: Create/Edit a Patron Block - HTML page title (#2829)
Browse files Browse the repository at this point in the history
  • Loading branch information
UladzislauKutarkin authored Jan 13, 2025
1 parent c8acdcc commit 99a9cec
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
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"
}

0 comments on commit 99a9cec

Please sign in to comment.