From 4ae44810d3c76d1ef8d6309a74d46a248dbc05b9 Mon Sep 17 00:00:00 2001 From: Manuel Hidalgo Lorente <36233273+ManuMinue@users.noreply.github.com> Date: Tue, 10 Oct 2023 15:06:34 +0200 Subject: [PATCH] [MM-54841] Convert LocalizedInput of 'oauth_to_email.tsx' to regular input component (#24852) --- .../claim/components/oauth_to_email.tsx | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/webapp/channels/src/components/claim/components/oauth_to_email.tsx b/webapp/channels/src/components/claim/components/oauth_to_email.tsx index c5af9d5243..cc4dcb6284 100644 --- a/webapp/channels/src/components/claim/components/oauth_to_email.tsx +++ b/webapp/channels/src/components/claim/components/oauth_to_email.tsx @@ -3,16 +3,13 @@ import classNames from 'classnames'; import React, {useRef, useState} from 'react'; -import {FormattedMessage} from 'react-intl'; +import {FormattedMessage, useIntl} from 'react-intl'; import type {AuthChangeResponse} from '@mattermost/types/users'; import {oauthToEmail} from 'actions/admin_actions.jsx'; -import LocalizedInput from 'components/localized_input/localized_input'; - import Constants from 'utils/constants'; -import {t} from 'utils/i18n'; import {isValidPassword, localizeMessage, toTitleCase} from 'utils/utils'; import type {getPasswordConfig} from 'utils/utils'; @@ -26,6 +23,7 @@ type Props = { } const OAuthToEmail = (props: Props) => { + const intl = useIntl(); const passwordInput = useRef(null); const passwordConfirmInput = useRef(null); @@ -72,8 +70,6 @@ const OAuthToEmail = (props: Props) => { }; const uiType = `${(props.currentType === Constants.SAML_SERVICE ? Constants.SAML_SERVICE.toUpperCase() : toTitleCase(props.currentType || ''))} SSO`; - const placeholderPasswordMessage = {id: t('claim.oauth_to_email.newPwd'), defaultMessage: 'New Password'}; - const placeholderConfirmMessage = {id: t('claim.oauth_to_email.confirm'), defaultMessage: 'Confirm Password'}; return ( <> @@ -99,22 +95,28 @@ const OAuthToEmail = (props: Props) => { />

-
-