Whitelabel signup form

This commit is contained in:
Tim Daubenschütz 2016-03-04 14:27:56 +01:00
parent 69dd08751b
commit 66e4591a56
2 changed files with 8 additions and 5 deletions

View File

@ -28,7 +28,8 @@ let SignupForm = React.createClass({
React.PropTypes.arrayOf(React.PropTypes.element),
React.PropTypes.element,
React.PropTypes.string
])
]),
whitelabel: React.PropTypes.object
},
mixins: [History],
@ -61,7 +62,8 @@ let SignupForm = React.createClass({
const { children,
headerMessage,
location: { query: { email: emailQuery } },
submitMessage } = this.props;
submitMessage,
whitelabel: { name: whitelabelName} } = this.props;
const tooltipPassword = getLangText('Your password must be at least 10 characters') + '.\n ' +
getLangText('This password is securing your digital property like a bank account') + '.\n ' +
@ -85,7 +87,7 @@ let SignupForm = React.createClass({
</span>
}>
<div className="ascribe-form-header">
<h3>{headerMessage}</h3>
<h3>{whitelabelName ? `Welcome to ${whitelabelName}` : headerMessage}</h3>
</div>
<Property
name='email'

View File

@ -34,7 +34,7 @@ let SignupContainer = React.createClass({
},
render() {
const { location } = this.props;
const { location, whitelabel } = this.props;
const { message, submitted } = this.state;
setDocumentTitle(getLangText('Sign up'));
@ -53,9 +53,10 @@ let SignupContainer = React.createClass({
<div className="ascribe-login-wrapper">
<SignupForm
handleSuccess={this.handleSuccess}
whitelabel={whitelabel}
location={location}/>
<div className="ascribe-login-text">
{getLangText('Already an ascribe user')}&#63; <Link to="/login">{getLangText('Log in')}...</Link><br/>
{getLangText(`Already a ${whitelabel.name || 'ascribe'} user`)}&#63; <Link to="/login">{getLangText('Log in')}...</Link><br/>
</div>
</div>