From 66e4591a56d425292161fe6b2861e0fe3482aee7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Daubensch=C3=BCtz?= Date: Fri, 4 Mar 2016 14:27:56 +0100 Subject: [PATCH 1/5] Whitelabel signup form --- js/components/ascribe_forms/form_signup.js | 8 +++++--- js/components/signup_container.js | 5 +++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/js/components/ascribe_forms/form_signup.js b/js/components/ascribe_forms/form_signup.js index 90d5e3ec..73a4ad3f 100644 --- a/js/components/ascribe_forms/form_signup.js +++ b/js/components/ascribe_forms/form_signup.js @@ -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({ }>
-

{headerMessage}

+

{whitelabelName ? `Welcome to ${whitelabelName}` : headerMessage}

- {getLangText('Already an ascribe user')}? {getLangText('Log in')}...
+ {getLangText(`Already a ${whitelabel.name || 'ascribe'} user`)}? {getLangText('Log in')}...
From 1c94ecc1777c971bf80a92248e2c57e66bfdbd0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Daubensch=C3=BCtz?= Date: Fri, 4 Mar 2016 15:53:55 +0100 Subject: [PATCH 2/5] Add footer property to Route --- js/components/ascribe_app.js | 3 +- js/components/footer.js | 9 +- .../prize/portfolioreview/pr_app.js | 3 +- .../whitelabel/prize/prize_routes.js | 72 +++---- .../prize/simple_prize/prize_app.js | 3 +- js/components/whitelabel/wallet/wallet_app.js | 3 +- .../whitelabel/wallet/wallet_routes.js | 199 ++++++------------ js/routes.js | 38 ++-- 8 files changed, 128 insertions(+), 202 deletions(-) diff --git a/js/components/ascribe_app.js b/js/components/ascribe_app.js index 87ab1daf..4848c01a 100644 --- a/js/components/ascribe_app.js +++ b/js/components/ascribe_app.js @@ -21,6 +21,7 @@ let AscribeApp = React.createClass({ render() { const { activeRoute, children, currentUser, routes, whitelabel } = this.props; + const Footer = activeRoute && activeRoute.footer; return (
@@ -34,7 +35,7 @@ let AscribeApp = React.createClass({ {/* Routes are injected here */} {children} -
+ {Footer ?
: null}
); } diff --git a/js/components/footer.js b/js/components/footer.js index 3010da4d..ced01fb5 100644 --- a/js/components/footer.js +++ b/js/components/footer.js @@ -4,13 +4,10 @@ import React from 'react'; import { getLangText } from '../utils/lang_utils'; -let Footer = React.createClass({ - propTypes: { - activeRoute: React.PropTypes.object.isRequired - }, +const Footer = React.createClass({ render() { - return !this.props.activeRoute.hideFooter ? ( + return (


@@ -28,7 +25,7 @@ let Footer = React.createClass({

- ) : null; + ); } }); diff --git a/js/components/whitelabel/prize/portfolioreview/pr_app.js b/js/components/whitelabel/prize/portfolioreview/pr_app.js index d8b9f982..1639e750 100644 --- a/js/components/whitelabel/prize/portfolioreview/pr_app.js +++ b/js/components/whitelabel/prize/portfolioreview/pr_app.js @@ -35,6 +35,7 @@ let PRApp = React.createClass({ const { activeRoute, children, currentUser, history, routes, whitelabel } = this.props; const subdomain = getSubdomain(); const path = activeRoute && activeRoute.path; + const Footer = activeRoute && activeRoute.footer; let style = {}; let header; @@ -64,7 +65,7 @@ let PRApp = React.createClass({ {/* Routes are injected here */} {children} -