Last active
July 19, 2017 09:23
-
-
Save cimfalab/acf4f37ca0f6aab5aef1642b53d86373 to your computer and use it in GitHub Desktop.
site-settings/form-general.jsx
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
import React, { Component } from 'react'; | |
class SiteSettingsFormGeneral extends Component { | |
blogAddress() { | |
translate( | |
'Buy a custom domain, ' + | |
'map a domain you already own, ' + | |
'or redirect this site.', | |
{ | |
components: { | |
domainSearchLink: ( | |
<a href={ '/domains/add/' + site.slug } onClick={ this.trackUpgradeClick } /> | |
), | |
mapDomainLink: ( | |
<a href={ '/domains/add/mapping/' + site.slug } onClick={ this.trackUpgradeClick } /> | |
), | |
redirectLink: ( | |
<a href={ '/domains/add/site-redirect/' + site.slug } onClick={ this.trackUpgradeClick } /> | |
) | |
} | |
} | |
) | |
return ( | |
<FormFieldset className="site-settings__has-divider"> | |
<FormLabel htmlFor="blogaddress">{ translate( 'Site Address' ) }</FormLabel> | |
<div className="site-settings__blogaddress-settings"> | |
<FormInput | |
name="blogaddress" | |
type="text" | |
id="blogaddress" | |
value={ site.domain } | |
disabled="disabled" /> | |
{ customAddress } | |
</div> | |
{ addressDescription } | |
</FormFieldset> | |
); | |
} | |
trackUpgradeClick() { | |
this.props.recordTracksEvent( 'calypso_upgrade_nudge_cta_click', { cta_name: 'settings_site_address' } ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment