-
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.
Merge pull request #632 from Automattic/add/no-cc-free-trials
Upgrades: No Credit Card Free Trials
- Loading branch information
Showing
10 changed files
with
167 additions
and
83 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
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
57 changes: 57 additions & 0 deletions
57
client/my-sites/upgrades/checkout/free-trial-confirmation-box.js
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 |
---|---|---|
@@ -0,0 +1,57 @@ | ||
|
||
/** | ||
* External dependencies | ||
*/ | ||
var React = require( 'react' ), | ||
classNames = require( 'classnames' ); | ||
|
||
/** | ||
* Internal dependencies | ||
*/ | ||
var PayButton = require( './pay-button' ), | ||
PaymentBox = require( './payment-box' ), | ||
TermsOfService = require( './terms-of-service' ); | ||
|
||
var FreeTrialConfirmationBox = React.createClass( { | ||
content: function() { | ||
return ( | ||
<form onSubmit={ this.props.onSubmit }> | ||
<div className="payment-box-section"> | ||
<h6> | ||
{ | ||
this.translate( 'Get started with %(productName)s', { args: { productName: this.props.cart.products[0].product_name } } ) | ||
} | ||
</h6> | ||
|
||
<span> | ||
{ | ||
this.translate( 'Enjoy your free trial with no strings attached: your site will simply revert to the free plan when the period is over.' ) | ||
} | ||
</span> | ||
</div> | ||
|
||
<TermsOfService /> | ||
<div className="payment-box-actions"> | ||
<PayButton | ||
cart={ this.props.cart } | ||
transactionStep={ this.props.transactionStep } /> | ||
</div> | ||
</form> | ||
); | ||
}, | ||
|
||
render: function() { | ||
var classSet = classNames( { | ||
'credits-payment-box': true, | ||
selected: this.props.selected === true | ||
} ); | ||
|
||
return ( | ||
<PaymentBox classSet={ classSet }> | ||
{ this.content() } | ||
</PaymentBox> | ||
); | ||
} | ||
} ); | ||
|
||
module.exports = FreeTrialConfirmationBox; |
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
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
Oops, something went wrong.