2015-06-20 16:43:18 +02:00
'use strict' ;
import React from 'react' ;
2015-09-30 18:30:50 +02:00
import { Link } from 'react-router' ;
2015-09-18 15:40:06 +02:00
2015-07-13 16:57:25 +02:00
import SignupForm from './ascribe_forms/form_signup' ;
2015-06-20 16:43:18 +02:00
2015-09-16 23:27:38 +02:00
import { getLangText } from '../utils/lang_utils' ;
2015-10-13 16:42:40 +02:00
import { setDocumentTitle } from '../utils/dom_utils' ;
2015-09-16 23:27:38 +02:00
2015-06-20 16:43:18 +02:00
2015-06-22 10:50:22 +02:00
let SignupContainer = React . createClass ( {
2015-10-01 11:16:38 +02:00
propTypes : {
2016-01-11 12:54:15 +01:00
// Provided from AscribeApp
currentUser : React . PropTypes . object ,
whitelabel : React . PropTypes . object ,
2016-01-11 16:26:36 +01:00
// Provided from router
2015-10-01 11:16:38 +02:00
location : React . PropTypes . object
} ,
2015-06-25 12:56:43 +02:00
getInitialState ( ) {
2015-07-13 16:57:25 +02:00
return {
2015-06-22 10:50:22 +02:00
submitted : false ,
message : null
2015-07-13 16:57:25 +02:00
} ;
2015-06-25 12:56:43 +02:00
} ,
2016-01-11 15:14:54 +01:00
handleSuccess ( message ) {
2015-06-22 10:50:22 +02:00
this . setState ( {
submitted : true ,
message : message
} ) ;
} ,
2015-06-25 12:56:43 +02:00
2015-06-20 16:43:18 +02:00
render ( ) {
2016-03-07 14:04:34 +01:00
const { location ,
whitelabel : { name : whitelabelName } } = this . props ;
2016-01-11 15:14:54 +01:00
const { message , submitted } = this . state ;
2015-10-13 16:42:40 +02:00
setDocumentTitle ( getLangText ( 'Sign up' ) ) ;
2016-01-11 15:14:54 +01:00
if ( submitted ) {
2015-06-22 10:50:22 +02:00
return (
< div className = "ascribe-login-wrapper" >
< br / >
< div className = "ascribe-login-text ascribe-login-header" >
2016-01-11 15:14:54 +01:00
{ message }
2015-06-22 10:50:22 +02:00
< / d i v >
< / d i v >
) ;
}
2015-06-20 16:43:18 +02:00
return (
< div className = "ascribe-login-wrapper" >
2015-10-01 11:16:38 +02:00
< SignupForm
handleSuccess = { this . handleSuccess }
2016-03-07 14:04:34 +01:00
whitelabelName = { whitelabelName }
2016-01-11 15:14:54 +01:00
location = { location } / >
2015-09-16 23:27:38 +02:00
< div className = "ascribe-login-text" >
2018-05-24 13:07:40 +02:00
{ getLangText ( ` Already a ${ whitelabelName || 'ascribe' } user ` ) } & # 63 ; < Link to = "/login" > { getLangText ( 'Log in' ) } ... < /Link><br/ > < br / >
2018-05-24 13:22:29 +02:00
We don ' t collect or use any data about you . The only thing we record are your artwork registrations and transactions with other users . We will only use your email to send you important updates and you can change your mind at anytime by clicking the unsubscribe link of any email you receive from us , or by requesting your data to be deleted via < a href = "mailto:gdpr@ascribe.io" > gdpr @ ascribe . io < /a>. For further information, visit our <a href="https:/ / www . ascribe . io / privacy / " > Privacy Policy < /a>.<br/ > < br / >
BigchainDB GmbH < br / >
Chausseestraße 19 < br / >
Berlin 10115 < br / >
Germany
2015-09-16 23:27:38 +02:00
< / d i v >
2015-06-20 16:43:18 +02:00
< / d i v >
2015-09-16 23:27:38 +02:00
2015-06-20 16:43:18 +02:00
) ;
}
} ) ;
2015-07-13 16:57:25 +02:00
export default SignupContainer ;