Skip to content

Commit

Permalink
Update UserForm.js
Browse files Browse the repository at this point in the history
  • Loading branch information
artem-blazhko committed Jan 21, 2025
1 parent 881671c commit 0b444a8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import PropTypes from 'prop-types';
import { FormattedMessage } from 'react-intl';
import {
FormattedMessage,
useIntl,
} from 'react-intl';

import {
Col,
Expand All @@ -21,6 +24,7 @@ const UserDetail = ({
proxy,
patronGroup = '',
}) => {
const { formatMessage } = useIntl();
const id = user?.id ?? request.requesterId;
const name = getRequesterName(user);
const proxyInformation = getProxyInformation(proxy, request.proxyUserId);
Expand All @@ -40,6 +44,7 @@ const UserDetail = ({
name={name}
id={id}
barcode={user.barcode}
ariaLabel={formatMessage({ id: 'ui-requests-mediated.form.requester.ariaLabel' })}
/>
<Row>
<Col xs={4}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const UserForm = ({
name={name}
id={user.id}
barcode={user.barcode}
ariaLabel={formatMessage({ id: 'ui-requests-mediated.form.requester.ariaLabel' }) }
ariaLabel={formatMessage({ id: 'ui-requests-mediated.form.requester.ariaLabel' })}
/>;
const proxySection = (isProxyAvailable && proxyInformation.id) ?
<UserHighlightBox
Expand Down
2 changes: 1 addition & 1 deletion src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ export const formatNoteReferrerEntityData = (entityData) => {

export const getUserHighlightBoxLink = (linkText, id, ariaLabel) => {
const additionalProps = {
...(ariaLabel ? { ariaLabel } : {}),
...(ariaLabel ? { 'aria-label': ariaLabel } : {}),
};

return linkText ?
Expand Down

0 comments on commit 0b444a8

Please sign in to comment.