1
0
mirror of https://github.com/ascribe/onion.git synced 2024-12-22 09:23:13 +01:00

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

View File

@ -34,7 +34,7 @@ let SignupContainer = React.createClass({
}, },
render() { render() {
const { location } = this.props; const { location, whitelabel } = this.props;
const { message, submitted } = this.state; const { message, submitted } = this.state;
setDocumentTitle(getLangText('Sign up')); setDocumentTitle(getLangText('Sign up'));
@ -53,9 +53,10 @@ let SignupContainer = React.createClass({
<div className="ascribe-login-wrapper"> <div className="ascribe-login-wrapper">
<SignupForm <SignupForm
handleSuccess={this.handleSuccess} handleSuccess={this.handleSuccess}
whitelabel={whitelabel}
location={location}/> location={location}/>
<div className="ascribe-login-text"> <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>
</div> </div>