diff --git a/packages/strapi-plugin-content-manager/admin/src/containers/ListSettingsView/index.js b/packages/strapi-plugin-content-manager/admin/src/containers/ListSettingsView/index.js index eb60d65bb1..5496aad951 100644 --- a/packages/strapi-plugin-content-manager/admin/src/containers/ListSettingsView/index.js +++ b/packages/strapi-plugin-content-manager/admin/src/containers/ListSettingsView/index.js @@ -7,7 +7,7 @@ import { // contexts useGlobalContext, } from 'strapi-helper-plugin'; -import { FormattedMessage } from 'react-intl'; +import { FormattedMessage, useIntl } from 'react-intl'; import { useDrop } from 'react-dnd'; import { DropdownItem } from 'reactstrap'; import { Inputs as Input } from '@buffetjs/custom'; @@ -30,6 +30,7 @@ const ListSettingsView = ({ deleteLayout, slug }) => { const [isOpen, setIsOpen] = useState(false); const [isModalFormOpen, setIsModalFormOpen] = useState(false); const [isDraggingSibling, setIsDraggingSibling] = useState(false); + const { formatMessage } = useIntl(); const { emitEvent } = useGlobalContext(); @@ -158,27 +159,21 @@ const ListSettingsView = ({ deleteLayout, slug }) => { const renderForm = () => { const type = get(attributes, [labelToEdit, 'type'], 'text'); const shouldDisplaySortToggle = !['media', 'relation'].includes(type); + const label = formatMessage({ id: `${pluginId}.form.Input.label` }); + const description = formatMessage({ id: `${pluginId}.form.Input.label.inputDescription` }); return ( <>
- - {label => ( - - {description => ( - {}} - value={get(labelForm, 'label', '')} - onChange={handleChangeEditLabel} - /> - )} - - )} - + {}} + value={get(labelForm, 'label', '')} + onChange={handleChangeEditLabel} + />
{shouldDisplaySortToggle && (