diff --git a/js/components/ascribe_forms/form_login.js b/js/components/ascribe_forms/form_login.js
index de483874..408aaf73 100644
--- a/js/components/ascribe_forms/form_login.js
+++ b/js/components/ascribe_forms/form_login.js
@@ -11,6 +11,7 @@ import UserActions from '../../actions/user_actions';
import Form from './form';
import Property from './property';
+import FormPropertyHeader from './form_property_header';
import apiUrls from '../../constants/api_urls';
import AppConstants from '../../constants/application_constants';
@@ -19,7 +20,10 @@ import { getLangText } from '../../utils/lang_utils';
let LoginForm = React.createClass({
+
propTypes: {
+ headerMessage: React.PropTypes.string,
+ submitMessage: React.PropTypes.string,
redirectOnLoggedIn: React.PropTypes.bool,
redirectOnLoginSuccess: React.PropTypes.bool
},
@@ -28,6 +32,8 @@ let LoginForm = React.createClass({
getDefaultProps() {
return {
+ headerMessage: 'Enter ascribe',
+ submitMessage: 'Log in',
redirectOnLoggedIn: true,
redirectOnLoginSuccess: true
};
@@ -80,6 +86,7 @@ let LoginForm = React.createClass({
render() {
return (
);
}
diff --git a/js/components/ascribe_forms/form_register_piece.js b/js/components/ascribe_forms/form_register_piece.js
index 41d0834f..6664fe6f 100644
--- a/js/components/ascribe_forms/form_register_piece.js
+++ b/js/components/ascribe_forms/form_register_piece.js
@@ -17,6 +17,12 @@ import { getLangText } from '../../utils/lang_utils';
let RegisterPieceForm = React.createClass({
+ propTypes: {
+ handleSuccess: React.PropTypes.func,
+ isFineUploaderEditable: React.PropTypes.bool,
+ children: React.PropTypes.element
+ },
+
getInitialState(){
return {
digitalWorkKey: null,
@@ -162,4 +168,4 @@ let FileUploader = React.createClass({
}
});
-export default RegisterPieceForm;
\ No newline at end of file
+export default RegisterPieceForm;
diff --git a/js/components/ascribe_forms/form_signup.js b/js/components/ascribe_forms/form_signup.js
index 3c50c7fd..3a5ce94e 100644
--- a/js/components/ascribe_forms/form_signup.js
+++ b/js/components/ascribe_forms/form_signup.js
@@ -21,11 +21,21 @@ import apiUrls from '../../constants/api_urls';
let SignupForm = React.createClass({
propTypes: {
- handleSuccess: React.PropTypes.func
+ headerMessage: React.PropTypes.string,
+ submitMessage: React.PropTypes.string,
+ handleSuccess: React.PropTypes.func,
+ children: React.PropTypes.element
},
mixins: [Router.Navigation],
+ getDefaultProps() {
+ return {
+ headerMessage: 'Welcome to ascribe',
+ submitMessage: 'Sign up'
+ };
+ },
+
getInitialState() {
return UserStore.getState();
},
@@ -72,7 +82,7 @@ let SignupForm = React.createClass({
getFormData={this.getFormData}
buttons={
}
spinner={
@@ -80,7 +90,7 @@ let SignupForm = React.createClass({
}>
- {getLangText('Welcome to ascribe')}
+ {getLangText(this.props.headerMessage)}
-
-
-
+ {this.props.children}
-
- {getLangText('Reset your ascribe password')}
+ {getLangText('Reset your password')}
@@ -157,4 +157,4 @@ let PasswordResetForm = React.createClass({
}
});
-export default PasswordResetContainer;
\ No newline at end of file
+export default PasswordResetContainer;
diff --git a/js/components/register_piece.js b/js/components/register_piece.js
index f0a59ab0..3e9f6c5f 100644
--- a/js/components/register_piece.js
+++ b/js/components/register_piece.js
@@ -27,7 +27,6 @@ import SlidesContainer from './ascribe_slides_container/slides_container';
import { mergeOptions } from '../utils/general_utils';
-import { getCookie } from '../utils/fetch_api_utils';
import { getLangText } from '../utils/lang_utils';
let RegisterPiece = React.createClass( {
diff --git a/js/components/signup_container.js b/js/components/signup_container.js
index 4824b891..0cf360f0 100644
--- a/js/components/signup_container.js
+++ b/js/components/signup_container.js
@@ -2,8 +2,10 @@
import React from 'react';
import SignupForm from './ascribe_forms/form_signup';
+import Property from './ascribe_forms/property';
+
+import { getLangText } from '../utils/lang_utils';
-// import { getLangText } from '../utils/lang_utils';
let SignupContainer = React.createClass({
getInitialState() {
@@ -33,8 +35,15 @@ let SignupContainer = React.createClass({
}
return (
);
}
diff --git a/js/components/whitelabel/prize/components/login_container.js b/js/components/whitelabel/prize/components/login_container.js
new file mode 100644
index 00000000..cab80774
--- /dev/null
+++ b/js/components/whitelabel/prize/components/login_container.js
@@ -0,0 +1,27 @@
+'use strict';
+
+import React from 'react';
+import Router from 'react-router';
+
+import LoginForm from '../../../ascribe_forms/form_login';
+
+let Link = Router.Link;
+
+
+let LoginContainer = React.createClass({
+ render() {
+ return (
+
+
+
+ I'm not a user Sign up...
+ I forgot my password Rescue me...
+
+
+ );
+ }
+});
+
+
+
+export default LoginContainer;
diff --git a/js/components/whitelabel/prize/components/signup_container.js b/js/components/whitelabel/prize/components/signup_container.js
new file mode 100644
index 00000000..da33a9a4
--- /dev/null
+++ b/js/components/whitelabel/prize/components/signup_container.js
@@ -0,0 +1,45 @@
+'use strict';
+
+import React from 'react';
+import SignupForm from '../../../ascribe_forms/form_signup';
+
+
+let SignupContainer = React.createClass({
+ getInitialState() {
+ return {
+ submitted: false,
+ message: null
+ };
+ },
+
+ handleSuccess(message){
+ this.setState({
+ submitted: true,
+ message: message
+ });
+ },
+
+ render() {
+ if (this.state.submitted){
+ return (
+
+
+
+ {this.state.message}
+
+
+ );
+ }
+ return (
+
+
+
+ );
+ }
+});
+
+
+export default SignupContainer;
diff --git a/js/components/whitelabel/prize/routes.js b/js/components/whitelabel/prize/routes.js
index 634fc531..69f8e525 100644
--- a/js/components/whitelabel/prize/routes.js
+++ b/js/components/whitelabel/prize/routes.js
@@ -4,6 +4,9 @@ import React from 'react';
import Router from 'react-router';
import Landing from './components/landing';
+import LoginContainer from './components/login_container';
+import SignupContainer from './components/signup_container';
+import PasswordResetContainer from '../../../components/password_reset_container';
import App from './app';
import AppConstants from '../../../constants/application_constants';
@@ -16,8 +19,10 @@ function getRoutes(commonRoutes) {
return (
-
- {commonRoutes}
+
+
+
+
);
}