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 ),
+ },
+ }
+ ) }
{ cancellationFeatures.map( ( feature ) => {
diff --git a/client/me/purchases/cancel-purchase/index.jsx b/client/me/purchases/cancel-purchase/index.jsx
index 632fc647290258..be7ae76817fc67 100644
--- a/client/me/purchases/cancel-purchase/index.jsx
+++ b/client/me/purchases/cancel-purchase/index.jsx
@@ -322,7 +322,7 @@ class CancelPurchase extends Component {
{
{ ! 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 (
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
);
};
-ConfirmCancelDomainLoadingPlaceholder.propTypes = {
- purchaseId: PropTypes.number.isRequired,
- selectedSite: PropTypes.oneOfType( [ PropTypes.bool, PropTypes.object ] ),
-};
-
export default localize( ConfirmCancelDomainLoadingPlaceholder );
diff --git a/client/me/purchases/confirm-cancel-domain/style.scss b/client/me/purchases/confirm-cancel-domain/style.scss
index 2da7aa42a8beeb..503a6b29289a48 100644
--- a/client/me/purchases/confirm-cancel-domain/style.scss
+++ b/client/me/purchases/confirm-cancel-domain/style.scss
@@ -10,9 +10,24 @@
}
}
+.confirm-cancel-domain__card {
+ padding: 32px;
+ padding-top: 12px;
+
+ .purchases__cancel-domain & {
+ box-shadow: none;
+ padding: 0;
+ }
+}
+
.confirm-cancel-domain__help-message,
.confirm-cancel-domain__confirm-container {
margin-top: 20px;
+
+ .form-label {
+ margin-top: 0;
+ margin-bottom: 1.5em;
+ }
}
.confirm-cancel-domain__reason-details {