-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restrict Site Transfer Input to Email Addresses (#97103)
- Loading branch information
Showing
2 changed files
with
8 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -87,9 +87,9 @@ const SiteOwnerTransferEligibility = ( { | |
checkSiteTransferEligibility( { newSiteOwner: tempSiteOwner } ); | ||
}; | ||
|
||
function onUserClick( userLogin: string ) { | ||
onRecipientChange( userLogin ); | ||
checkSiteTransferEligibility( { newSiteOwner: userLogin } ); | ||
function onUserClick( userEmail: string ) { | ||
onRecipientChange( userEmail ); | ||
checkSiteTransferEligibility( { newSiteOwner: userEmail } ); | ||
} | ||
|
||
function onRecipientChange( recipient: string ) { | ||
|
@@ -102,7 +102,7 @@ const SiteOwnerTransferEligibility = ( { | |
<form onSubmit={ handleFormSubmit }> | ||
<FormText> | ||
{ translate( | ||
"Ready to transfer {{strong}}%(siteSlug)s{{/strong}} and its associated purchases? Simply enter the new owner's email or WordPress.com username below, or choose an existing user to start the transfer process.", | ||
"Ready to transfer {{strong}}%(siteSlug)s{{/strong}} and its associated purchases? Simply enter the new owner's email below, or choose an existing user to start the transfer process.", | ||
{ | ||
args: { siteSlug }, | ||
components: { strong: <Strong /> }, | ||
|
@@ -111,13 +111,13 @@ const SiteOwnerTransferEligibility = ( { | |
</FormText> | ||
|
||
<FormFieldset> | ||
<FormLabel>{ translate( 'Email or WordPress.com username' ) }</FormLabel> | ||
<FormLabel>{ translate( 'Email' ) }</FormLabel> | ||
<FormTextInput | ||
id="recipient" | ||
name="recipient" | ||
value={ tempSiteOwner } | ||
isError={ recipientError } | ||
placeholder="@" | ||
placeholder="[email protected]" | ||
onChange={ ( e: ChangeEvent< HTMLInputElement > ) => onRecipientChange( e.target.value ) } | ||
/> | ||
{ recipientError && ( | ||
|
@@ -144,7 +144,7 @@ const SiteOwnerTransferEligibility = ( { | |
<TeamMembersSiteTransfer | ||
search={ tempSiteOwner } | ||
usersQuery={ usersQuery } | ||
onClick={ ( userLogin: string ) => onUserClick( userLogin ) } | ||
onClick={ ( userEmail: string ) => onUserClick( userEmail ) } | ||
/> | ||
) } | ||
|
||
|