diff --git a/client/me/purchases/cancel-purchase/feature-list.jsx b/client/me/purchases/cancel-purchase/feature-list.jsx index abf9615ddf340d..92717fea70139d 100644 --- a/client/me/purchases/cancel-purchase/feature-list.jsx +++ b/client/me/purchases/cancel-purchase/feature-list.jsx @@ -1,7 +1,7 @@ import { getFeatureByKey } from '@automattic/calypso-products'; // eslint-disable-line import/named import { Gridicon } from '@automattic/components'; import { useTranslate } from 'i18n-calypso'; -import { getName } from 'calypso/lib/purchases'; +import { getName, isRefundable } from 'calypso/lib/purchases'; const CancelPurchaseFeatureList = ( { purchase, cancellationFeatures } ) => { const translate = useTranslate(); @@ -13,14 +13,23 @@ const CancelPurchaseFeatureList = ( { purchase, cancellationFeatures } ) => { return (

- { translate( - 'By canceling the %(productName)s plan, these features will no longer be available on your site:', - { - args: { - productName: getName( purchase ), - }, - } - ) } + { isRefundable( purchase ) + ? translate( + 'By canceling the %(productName)s plan, these features will no longer be available on your site:', + { + args: { + productName: getName( purchase ), + }, + } + ) + : translate( + 'These features will no longer be available on your site when your %(productName)s plan expires:', + { + args: { + productName: getName( purchase ), + }, + } + ) }

{ { ! isRefundable( purchase ) && maybeWithinRefundPeriod( purchase ) ? translate( 'Have a question or seeking a refund?' ) - : translate( 'Need help with your purchase?' ) } - - + : translate( 'Need help with your purchase?' ) }{ ' ' } { translate( '{{contactLink}}Ask a Happiness Engineer{{/contactLink}}.', { components: { contactLink: ( diff --git a/client/me/purchases/confirm-cancel-domain/index.jsx b/client/me/purchases/confirm-cancel-domain/index.jsx index 5e56288426617f..9d466fbf68baf5 100644 --- a/client/me/purchases/confirm-cancel-domain/index.jsx +++ b/client/me/purchases/confirm-cancel-domain/index.jsx @@ -1,6 +1,6 @@ import { isDomainRegistration } from '@automattic/calypso-products'; import page from '@automattic/calypso-router'; -import { Card, FormLabel } from '@automattic/components'; +import { Card, CompactCard, FormLabel } from '@automattic/components'; import i18n, { getLocaleSlug, localize } from 'i18n-calypso'; import { map, find } from 'lodash'; import PropTypes from 'prop-types'; @@ -8,11 +8,12 @@ import { Component, Fragment } from 'react'; import { connect } from 'react-redux'; import ActionPanelLink from 'calypso/components/action-panel/link'; import QueryUserPurchases from 'calypso/components/data/query-user-purchases'; +import FormattedHeader from 'calypso/components/formatted-header'; import FormButton from 'calypso/components/forms/form-button'; import FormCheckbox from 'calypso/components/forms/form-checkbox'; -import FormSectionHeading from 'calypso/components/forms/form-section-heading'; import FormSelect from 'calypso/components/forms/form-select'; import FormTextarea from 'calypso/components/forms/form-textarea'; +import HeaderCakeBack from 'calypso/components/header-cake/back'; import PageViewTracker from 'calypso/lib/analytics/page-view-tracker'; import { recordTracksEvent } from 'calypso/lib/analytics/tracks'; import { getName as getDomainName } from 'calypso/lib/purchases'; @@ -191,12 +192,18 @@ class ConfirmCancelDomain extends Component { return (
-

{ selectedReason.helpMessage }

- { selectedReason.showTextarea && ( - + { selectedReason.showTextarea ? ( + <> +

{ selectedReason.helpMessage }

+ + + ) : ( + + { selectedReason.helpMessage } + ) }
); @@ -234,7 +241,7 @@ class ConfirmCancelDomain extends Component { if ( this.state.submitting ) { return ( - { this.props.translate( 'Cancelling Domain…' ) } + { this.props.translate( 'Cancelling domain…' ) } ); } @@ -245,14 +252,14 @@ class ConfirmCancelDomain extends Component { if ( selectedReason && 'misspelled' === selectedReason.value ) { return ( - { this.props.translate( 'Cancel Anyway' ) } + { this.props.translate( 'Cancel anyway' ) } ); } return ( - { this.props.translate( 'Cancel Domain' ) } + { this.props.translate( 'Cancel domain' ) } ); }; @@ -262,10 +269,7 @@ class ConfirmCancelDomain extends Component { return (
- +
); } @@ -284,10 +288,22 @@ class ConfirmCancelDomain extends Component { title="Purchases > Confirm Cancel Domain" /> - - - { this.props.translate( 'Canceling %(domain)s', { args: { domain } } ) } - + +
+ +
+

{ this.props.translate( 'Since domain cancellation can cause your site to stop working, ' + diff --git a/client/me/purchases/confirm-cancel-domain/loading-placeholder.jsx b/client/me/purchases/confirm-cancel-domain/loading-placeholder.jsx index 8ef24697d31a06..d30a7032765891 100644 --- a/client/me/purchases/confirm-cancel-domain/loading-placeholder.jsx +++ b/client/me/purchases/confirm-cancel-domain/loading-placeholder.jsx @@ -1,35 +1,15 @@ -import { Button, Card, CompactCard } from '@automattic/components'; +import { Card } from '@automattic/components'; import { localize } from 'i18n-calypso'; -import PropTypes from 'prop-types'; -import LoadingPlaceholder from 'calypso/me/purchases/components/loading-placeholder'; -import { cancelPurchase } from 'calypso/me/purchases/paths'; -import titles from 'calypso/me/purchases/titles'; - -const ConfirmCancelDomainLoadingPlaceholder = ( { purchaseId, selectedSite } ) => { - let path; - - if ( selectedSite ) { - path = cancelPurchase( selectedSite.slug, purchaseId ); - } +const ConfirmCancelDomainLoadingPlaceholder = () => { return ( - - -

-
-
-
- - -